import { FC, ReactNode, useContext } from 'react'; import { Box } from '@mui/material'; import { GlobalAppState } from '../../core/shareObject/globalAppState'; import { Theme } from '../../core/theme/types'; import { Color } from '../../palette'; type CardProps = { children?: ReactNode; padding?: number; margin?: string | number; title?: ReactNode | string; footer?: ReactNode | string; icon?: ReactNode; background?: string; }; export const Card: FC = ({ children, padding, margin, title, footer, icon, background }) => { const { getContext } = useContext(GlobalAppState); const theme = getContext().theme; const content = {children}; return ( {title && ( {icon && {icon}} {typeof title === 'string' ?

{title}

: title}
)} {content} {footer && ( {typeof footer === 'string' ?

{footer}

: footer}
)}
); };