import classNames from 'classnames'; import './Card.scss'; export interface CardProps { header?: boolean; footer?: boolean; title?: string; footerContent?: any; variant: 'default' | 'primary' | 'success' | 'warning' | 'error'; rounded?: boolean; shadow?: boolean; paddingRequired?: boolean; size?: 'x-small' | 'small' | 'medium' | 'large'; classnames?: any; contentXPosition?: 'start' | 'center' | 'end'; contentYPosition?: 'top' | 'center' | 'bottom'; headerClasses?: ''; contentClasses?: ''; footerClasses?: ''; children?: any; } export interface CardIconProps { name: string; height?: number; width?: number; } /** * *__header__* : Boolean to show/hide header | optional | default is 'true' * *__footer__* : Boolean to show/hide footer | optional | default is 'true' * *__title__* : title of the card | optional * *__type__* : type of the card theme | default is 'primary' * *__rounded__* : Boolean to control card border radius | optional | default is 'false' * *__shadow__* : Boolean to control card shadow | optional | default is 'false' * *__paddingRequired__* : Boolean to control card content padding | optional * *__size__* : size of the header text | optional | default is 'small' * *__classnames__* : classnames to custom style the card | optional * *__contentXPosition__* : card content's horizontal position | optional | default is 'center' : 'start' | 'center' | 'end'; * *__contentYPosition__* : card content's vertical position | optional | default is 'center' : 'top' | 'center' | 'bottom'; * *__headerClasses__* : css classes for card header | optional * *__contentClasses__* : css classes for card content | optional * *__footerClasses__* : css classes for card footer | optional */ const Card = ({ variant = 'primary', header = true, footer = false, title = 'Basic card', size = 'small', rounded = false, shadow = false, paddingRequired = true, contentXPosition = 'center', contentYPosition = 'center', headerClasses = '', contentClasses = '', footerClasses = '', children = '', footerContent = '', }: CardProps) => { return (