Skip to content

Commit 47c8ad1

Browse files
committed
fix(card): update Figma Code Connect to match new Card API
Replace Card.Content with Card.Body and replace borderStyle/elevation props with the new variant prop after the Card component rework.
1 parent 43a4e82 commit 47c8ad1

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/nimbus/src/components/card/card.figma.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import figma from "@figma/code-connect/react";
22
import { Card } from "./card";
33

4-
// --- Card content → Card.Content ---
4+
// --- Card content → Card.Body ---
55
// NOTE: Skipped INSTANCE_SWAP "image" → no matching code prop "image"
66
figma.connect(
7-
Card.Content,
7+
Card.Body,
88
"https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=266-482",
99
{
1010
props: {
@@ -20,10 +20,10 @@ figma.connect(
2020
<>
2121
{props.leadingElement}
2222
{props.header}
23-
<Card.Content>
23+
<Card.Body>
2424
{props.instance}
2525
{props.children}
26-
</Card.Content>
26+
</Card.Body>
2727
</>
2828
),
2929
}
@@ -36,13 +36,13 @@ figma.connect(
3636
{
3737
props: {
3838
children: figma.children("*"),
39-
borderStyle: figma.enum("Outlined", { Yes: "outlined", No: "none" }),
40-
elevation: figma.enum("Elevated", { Yes: "elevated", No: "none" }),
39+
variant: figma.enum("Elevated", {
40+
Yes: "elevated" as const,
41+
No: "outlined" as const,
42+
}),
4143
},
4244
example: (props) => (
43-
<Card.Root borderStyle={props.borderStyle} elevation={props.elevation}>
44-
{props.children}
45-
</Card.Root>
45+
<Card.Root variant={props.variant}>{props.children}</Card.Root>
4646
),
4747
}
4848
);

0 commit comments

Comments
 (0)