import React, { ReactNode, forwardRef } from 'react'; import { Box } from './Box'; import { Surface, SurfaceProps } from './Surface'; export interface CardProps extends Omit, 'children' | 'title' | 'variant'> { children: ReactNode; variant?: 'default' | 'dark' | 'muted' | 'glass' | 'outline' | 'rarity-common' | 'rarity-rare' | 'rarity-epic' | 'rarity-legendary'; title?: ReactNode; footer?: ReactNode; } export const Card = forwardRef(({ children, variant = 'default', title, footer, ...props }, ref) => { const isOutline = variant === 'outline'; const style: React.CSSProperties = isOutline ? { backgroundColor: 'transparent', border: '1px solid var(--ui-color-border-default)', } : {}; return ( {title && ( {typeof title === 'string' ? (

{title}

) : title}
)} {children} {footer && ( {footer} )}
); }); Card.displayName = 'Card'; export const CardHeader = ({ title, children }: { title?: string, children?: ReactNode }) => ( {title &&

{title}

} {children}
); export const CardContent = ({ children }: { children: ReactNode }) => ( {children} ); export const CardFooter = ({ children }: { children: ReactNode }) => ( {children} );