Function
Card
({
className,
size = "default",
...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" })
Source from the content-addressed store, hash-verified
| 3 | import { cn } from "../../lib/utils"; |
| 4 | |
| 5 | function Card({ |
| 6 | className, |
| 7 | size = "default", |
| 8 | ...props |
| 9 | }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) { |
| 10 | return ( |
| 11 | <div |
| 12 | data-slot="card" |
| 13 | data-size={size} |
| 14 | className={cn( |
| 15 | "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", |
| 16 | className, |
| 17 | )} |
| 18 | {...props} |
| 19 | /> |
| 20 | ); |
| 21 | } |
| 22 | |
| 23 | function CardHeader({ className, ...props }: React.ComponentProps<"div">) { |
| 24 | return ( |
Callers
nothing calls this directly
Tested by
no test coverage detected