import * as React from 'react'; import { cn } from '@/lib/utils'; import { Text, type TextProps } from './Text'; type CardActionProps = React.ComponentProps<'div'>; type CardContentProps = React.ComponentProps<'div'>; type CardDescriptionProps = Omit; type CardFooterProps = React.ComponentProps<'div'>; type CardHeaderProps = React.ComponentProps<'div'>; type CardProps = React.ComponentProps<'div'>; type CardTitleProps = Omit; function CardAction({ className, ...props }: CardActionProps) { return (
); } function CardContent({ className, ...props }: CardContentProps) { return (
[data-slot=card-footer]:not(.border-t))]:pb-0 in-[[data-slot=card]:has(>[data-slot=card-header]:not(.border-b))]:pt-0', className, )} data-slot="card-content" {...props} /> ); } function CardDescription({ className, ...props }: CardDescriptionProps) { return ( ); } function CardFooter({ className, ...props }: CardFooterProps) { return (
[data-slot=card-content])]:pt-4', className, )} data-slot="card-footer" {...props} /> ); } function CardHeader({ className, ...props }: CardHeaderProps) { return (
[data-slot=card-content])]:pb-4 has-data-[slot=card-action]:grid-cols-[1fr_auto]', className, )} data-slot="card-header" {...props} /> ); } function CardRoot({ className, ...props }: CardProps) { return (
); } function CardTitle({ className, ...props }: CardTitleProps) { return ( ); } const Card = Object.assign(CardRoot, { Action: CardAction, Content: CardContent, Description: CardDescription, Footer: CardFooter, Header: CardHeader, Title: CardTitle, }); export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, }; export type { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps, };