Skip to content

Commit 80d95d1

Browse files
committed
feat(CC-batch-6): updated required props
1 parent 78ad70d commit 80d95d1

3 files changed

Lines changed: 40 additions & 5 deletions

File tree

packages/code-connect/components/JumpLinks/JumplinkVertical.figma.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ figma.connect(
1010
tabText: figma.string('Tab Text'),
1111

1212
// enum
13-
isActive: figma.enum('State', { Selected: true }),
14-
15-
children: figma.children('*')
13+
isActive: figma.enum('State', { Selected: true })
1614
},
1715
example: (props) => (
1816
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
1917
<JumpLinksItem href="#" isActive={props.isActive}>
2018
{props.tabText}
21-
{props.children}
2219
</JumpLinksItem>
2320
)
2421
}

packages/code-connect/components/JumpLinks/JumplinksVertical.figma.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ figma.connect(
77
{
88
props: {
99
// boolean
10-
label: figma.boolean('Show Label', { true: figma.children('Label') }),
10+
label: figma.boolean('Show Label', {
11+
true: figma.children('Label'),
12+
false: undefined
13+
}),
1114

1215
children: figma.children('*')
1316
},
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import figma from '@figma/code-connect';
2+
import { Label } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Label integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Label,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-609',
11+
{
12+
props: {
13+
text: figma.string('Text'),
14+
variant: figma.enum('Type', {
15+
Filled: 'filled',
16+
Outlined: 'outlined'
17+
}),
18+
isCompact: figma.enum('Type', {
19+
Compact: true
20+
})
21+
},
22+
example: (props) => (
23+
// Documentation for Label can be found at https://www.patternfly.org/components/label
24+
<Label
25+
color={props.color}
26+
variant={props.variant}
27+
isCompact={props.isCompact}
28+
isEditable={props.isEditable}
29+
isDismissable={props.isDismissable}
30+
text={props.text}
31+
hasIcon={props.hasIcon}
32+
/>
33+
)
34+
}
35+
);

0 commit comments

Comments
 (0)