stock-bot/apps/stock/web-app/src/components/ui/Card.tsx
2025-06-23 16:55:29 -04:00

40 lines
935 B
TypeScript

import type { ReactNode } from 'react';
import { cn } from '@/lib/utils';
interface CardProps {
children: ReactNode;
className?: string;
hover?: boolean;
}
export function Card({ children, className, hover = false }: CardProps) {
return (
<div
className={cn(
'bg-surface-secondary rounded-lg border border-border',
hover && 'hover:border-primary-500/50 transition-colors',
className
)}
>
{children}
</div>
);
}
interface CardHeaderProps {
children: ReactNode;
className?: string;
}
export function CardHeader({ children, className }: CardHeaderProps) {
return <div className={cn('flex items-center mb-3', className)}>{children}</div>;
}
interface CardContentProps {
children: ReactNode;
className?: string;
}
export function CardContent({ children, className }: CardContentProps) {
return <div className={cn('space-y-2', className)}>{children}</div>;
}