import { type FC, type ReactNode } from 'react' import { Card } from 'antd'; import clsx from 'clsx'; interface RbCardProps { title?: string | ReactNode; subTitle?: string; extra?: ReactNode; children: ReactNode; avatar?: ReactNode; className?: string; } const RbCard: FC = ({ title, subTitle, extra, children, avatar, className, }) => { if (avatar) { return ( {title &&
{avatar}
{title}
{subTitle &&
{subTitle}
} {extra}
} {children}
) } return (
{title}
{subTitle &&
{subTitle}
} {extra} : null } classNames={{ header: 'rb:p-[0]! rb:m-[0_20px]!', body: `rb:p-[16px_20px_20px_16px] ${className || ''}`, }} style={{ background: '#FBFDFF' }} > {children}
) } export default RbCard