import React from 'react'
import CardHeader from './CardHeader'
import { CardBaseProps } from './types'
import { StyledCard } from './styles'

const Card = ({ children, title }: CardBaseProps) => {
  return (
    <StyledCard>
      {title && <CardHeader title={title} />}
      {children}
    </StyledCard>
  )
}

export default Card
