import React, { HTMLAttributes, ReactNode } from 'react'; interface CardProps extends HTMLAttributes { children: ReactNode; hover?: boolean; } interface CardHeaderProps { children: ReactNode; className?: string; } interface CardBodyProps { children: ReactNode; className?: string; } interface CardFooterProps { children: ReactNode; className?: string; } export const Card: React.FC = ({ children, hover = true, className = '', ...props }) => { const classes = ['card', hover ? '' : 'no-hover', className].filter(Boolean).join(' '); return (
{children}
); }; export const CardHeader: React.FC = ({ children, className = '' }) => { return
{children}
; }; export const CardBody: React.FC = ({ children, className = '' }) => { return
{children}
; }; export const CardFooter: React.FC = ({ children, className = '' }) => { return
{children}
; }; // Stat Card Component interface StatCardProps { icon?: ReactNode; value: string | number; label: string; change?: { value: string; positive: boolean; }; className?: string; } export const StatCard: React.FC = ({ icon, value, label, change, className = '' }) => { return (
{icon &&
{icon}
}
{value}
{label}
{change && (
{change.value}
)}
); }; export default Card;