import { classNames } from '@/utils'; import React, { HTMLAttributes } from 'react'; type CardProps = HTMLAttributes & { className?: string; children: React.ReactNode; clickable?: boolean; onClick?: () => void; }; const Card = ({ className, children, clickable, onClick, ...rest }: CardProps) => { return (
clickable && onClick?.()} {...rest} > {children}
); }; // Card Header type CardHeaderProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Header = ({ className, children, ...rest }: CardHeaderProps) => { return (
{children}
); }; // Card Title type CardTitleProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Title = ({ className, children, ...rest }: CardTitleProps) => { return (

{children}

); }; // Card Subtitle type CardSubtitleProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Subtitle = ({ className, children, ...rest }: CardSubtitleProps) => { return (

{children}

); }; // Card Text type CardTextProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Text = ({ className, children, ...rest }: CardTextProps) => { return (
{children}
); }; // Card Body type CardBodyProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Body = ({ className, children, ...rest }: CardBodyProps) => { return (
{children}
); }; // Card Footer type CardFooterProps = { className?: string; children: React.ReactNode; } & HTMLAttributes; const Footer = ({ className, children, ...rest }: CardFooterProps) => { return (
{children}
); }; Card.Header = Header; Card.Title = Title; Card.Subtitle = Subtitle; Card.Text = Text; Card.Body = Body; Card.Footer = Footer; export default Card;