import type { ReactNode } from 'react' import { Card, CardContent, CardHeader, CardTitle, cn } from 'ui' import { DynamicLink } from '@/components/ui/DynamicLink' const STRETCHED_TARGET_CLASS = 'block w-full truncate text-left outline-hidden after:absolute after:inset-0 after:rounded-lg focus-visible:after:ring-1 focus-visible:after:ring-foreground-muted' type HomeCardTarget = { href: string; onClick?: () => void } | { onClick: () => void; href?: never } type HomeCardProps = HomeCardTarget & { icon: ReactNode label: string title: string actions?: ReactNode description?: ReactNode meta?: ReactNode className?: string } export const HomeCard = ({ href, onClick, icon, label, title, actions, description, meta, className, }: HomeCardProps) => (
{icon} {label}
{actions &&
{actions}
}

{href !== undefined ? ( {title} ) : ( )}

{description && (
{description}
)} {meta &&

{meta}

}
)