import { Card, CardHeader, CardBody, CardFooter } from 'reactstrap'; import { FC, PropsWithChildren, ReactNode } from 'react'; import './ChartCard.scss'; type ChartCardProps = PropsWithChildren<{ title: Function | string; footer?: ReactNode; }>; export const ChartCard: FC = ({ title, footer, children }) => ( {typeof title === 'function' ? title() : title} {children} {footer && {footer}} );