import type { FC, PropsWithChildren, ReactNode } from 'react'; import { Card, CardBody, CardFooter, CardHeader } from 'reactstrap'; 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}} );