import type { HTMLAttributes, ReactNode } from 'react'; import { cx } from '../utils/cx'; export interface CardProps extends HTMLAttributes { elevation?: 'flat' | 'raised' | 'floating'; padding?: 'none' | 'sm' | 'md' | 'lg'; hover?: boolean; interactive?: boolean; } export function Card({ elevation = 'raised', padding = 'md', hover = false, interactive = false, className, children, ...rest }: CardProps) { return (
{children}
); } export interface CardHeaderProps extends Omit, 'title'> { title?: ReactNode; subtitle?: ReactNode; actions?: ReactNode; } export function CardHeader({ title, subtitle, actions, className, children, ...rest }: CardHeaderProps) { return (
{title &&

{title}

} {subtitle &&

{subtitle}

} {children}
{actions &&
{actions}
}
); } export function CardBody({ className, children, ...rest }: HTMLAttributes) { return (
{children}
); } export function CardFooter({ className, children, ...rest }: HTMLAttributes) { return (
{children}
); } export interface CardMediaProps extends HTMLAttributes { ratio?: string; } export function CardMedia({ ratio = '16 / 9', className, style, children, ...rest }: CardMediaProps) { return (
{children}
); }