MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / Card

Function Card

packages/plugin-ui/src/components/ui/card.tsx:5–21  ·  view source on GitHub ↗
({
  className,
  size = "default",
  ...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" })

Source from the content-addressed store, hash-verified

3import { cn } from "../../lib/utils";
4
5function 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
23function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
24 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected