Skip to content

Commit 87e29cb

Browse files
committed
feat(CC-batch-1): verification complete
1 parent a366810 commit 87e29cb

7 files changed

Lines changed: 50 additions & 43 deletions

File tree

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import figma from '@figma/code-connect';
2-
import { AboutModal } from '@patternfly/react-core';
2+
import { AboutModal, Button } from '@patternfly/react-core';
33

4+
// Documentation for AboutModal can be found at https://www.patternfly.org/components/about-modal
45
figma.connect(
56
AboutModal,
67
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2879-13973&t=15CEJpGgVui7qP5Q-11',
78
{
89
props: {
910
// static
11+
backgroundImageSrc: '/assets/images/background.png',
1012
brandImageAlt: 'Brand Image Alt Text',
1113
brandImageSrc: 'Brand Image Source',
12-
backgroundImageSrc: '/assets/images/background.png',
1314
trademark: 'Copyright © 2024',
1415

1516
// string
@@ -18,17 +19,23 @@ figma.connect(
1819
// children
1920
children: figma.children('*')
2021
},
21-
example: (props) => (
22-
// Documentation for AboutModal can be found at https://www.patternfly.org/components/about-modal
23-
<AboutModal
24-
productName={props.productName}
25-
trademark={props.trademark}
26-
brandImageSrc={props.brandImageSrc}
27-
brandImageAlt={props.brandImageAlt}
28-
backgroundImageSrc={props.backgroundImageSrc}
29-
>
30-
{props.children}
31-
</AboutModal>
32-
)
22+
example: (props) => {
23+
<>
24+
<Button variant="primary" onClick={() => {}}>
25+
Show about modal
26+
</Button>
27+
<AboutModal
28+
backgroundImageSrc={props.backgroundImageSrc}
29+
brandImageSrc={props.brandImageSrc}
30+
brandImageAlt={props.brandImageAlt}
31+
isOpen={true || false}
32+
onClose={() => {}}
33+
productName={props.productName}
34+
trademark={props.trademark}
35+
>
36+
{props.children}
37+
</AboutModal>
38+
</>;
39+
}
3340
}
3441
);

packages/code-connect/components/Accordion/Accordion.figma.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import figma from '@figma/code-connect';
22
import { Accordion } from '@patternfly/react-core';
33

4+
// Documentation for Accordion can be found at https://www.patternfly.org/components/accordion
5+
46
figma.connect(
57
Accordion,
68
'https://www.figma.com/file/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2621-623',
@@ -11,17 +13,12 @@ figma.connect(
1113
Bordered: true,
1214
'Large Bordered': true
1315
}),
14-
displaySize: figma.enum('Type', {
15-
'Large Bordered': 'lg'
16-
}),
17-
togglePosition: figma.enum('Caret position', {
18-
Left: 'start'
19-
}),
16+
displaySize: figma.enum('Type', { 'Large Bordered': 'lg' }),
17+
togglePosition: figma.enum('Caret position', { Left: 'start' }),
2018

2119
children: figma.children('*')
2220
},
2321
example: (props) => (
24-
// Documentation for Accordion can be found at https://www.patternfly.org/components/accordion
2522
<Accordion togglePosition={props.togglePosition} isBordered={props.isBordered} displaySize={props.displaySize}>
2623
{props.children}
2724
</Accordion>

packages/code-connect/components/Accordion/AccordionToggle.figma.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import figma from '@figma/code-connect';
22
import { AccordionItem, AccordionToggle, AccordionContent } from '@patternfly/react-core';
33

4+
// Documentation for AccordionToggle can be found at https://www.patternfly.org/components/accordion
5+
46
figma.connect(
57
AccordionToggle,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1423-687',
@@ -20,7 +22,6 @@ figma.connect(
2022
children: figma.children('*')
2123
},
2224
example: (props) => (
23-
// Documentation for Accordion can be found at https://www.patternfly.org/components/accordion
2425
<AccordionItem isExpanded={props.isExpanded}>
2526
<AccordionToggle onClick={() => {}} id="<your-id>">
2627
{props.toggleTextExpanded}

packages/code-connect/components/ActionList/ActionList.figma.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ import figma from '@figma/code-connect';
22
import { ActionList } from '@patternfly/react-core';
33

44
// TODO: FIGMA: Add ActionListGroup component
5+
// TODO: FIGMA: Add ActionListItem component
6+
// Documentation for ActionList can be found at https://www.patternfly.org/components/action-list
57

68
figma.connect(
79
ActionList,
8-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6780-15839&m=dev',
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6780-15839',
911
{
1012
props: {
13+
// enum
1114
isIconList: figma.enum('Type', { 'Action icons only': true }),
15+
1216
children: figma.children('*')
1317
},
14-
example: (props) => (
15-
// Documentation for ActionList can be found at https://www.patternfly.org/components/action-list
16-
<ActionList isIconList={props.isIconList}>{props.children}</ActionList>
17-
)
18+
example: (props) => <ActionList isIconList={props.isIconList}>{props.children}</ActionList>
1819
}
1920
);
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import figma from '@figma/code-connect';
22
import { BackgroundImage } from '@patternfly/react-core';
33

4+
// Documentation for BackgroundImage can be found at https://www.patternfly.org/components/background-image
5+
46
figma.connect(
57
BackgroundImage,
68
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2722-13543',
79
{
8-
props: {},
9-
example: () => (
10-
// Documentation for BackgroundImage can be found at https://www.patternfly.org/components/background-image
11-
<BackgroundImage src="/assets/images/pf-background.svg" />
12-
)
10+
example: () => <BackgroundImage src="/assets/images/pf-background.svg" />
1311
}
1412
);

packages/code-connect/components/ClipboardCopy/ClipboardCopyBasic.figma.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
import figma from '@figma/code-connect';
22
import { ClipboardCopy } from '@patternfly/react-core';
33

4+
// TODO: FIGMA: ClipboardCopy is using InputGroup improperly. There's no InputGroup wrapper for InputGroupItems
5+
46
figma.connect(
57
ClipboardCopy,
6-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75835&m=dev',
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75835',
79
{
810
props: {
911
// enum
1012
isActive: figma.enum('State', { Active: true }),
11-
isReadOnly: figma.enum('State', { 'Read only': true }),
1213
isExpanded: figma.enum('State', { Expanded: true }),
14+
isReadOnly: figma.enum('State', { 'Read only': true }),
1315
expansion: figma.enum('State', {
1416
Expanded: 'expansion',
1517
false: undefined
1618
}),
1719

18-
children: figma.children('*')
20+
inputText: figma.nestedProps('Input Group Items', {
21+
value: figma.string('✏️ Input text')
22+
})
1923
},
2024
example: (props) => (
2125
// Documentation for ClipboardCopy can be found at https://www.patternfly.org/components/clipboard-copy
2226
<ClipboardCopy
27+
clickTip="Copied"
28+
hoverTip="Copy"
29+
isActive={props.isActive}
30+
isExpanded={props.isExpanded}
2331
isReadOnly={props.isReadOnly}
2432
variant={props.expansion}
25-
isExpanded={props.isExpanded}
26-
isActive={props.isActive}
2733
>
28-
{props.children}
34+
{props.inputText.value}
2935
</ClipboardCopy>
3036
)
3137
}

packages/code-connect/components/ClipboardCopy/ClipboardCopyInlineCompact.figma.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import figma from '@figma/code-connect';
22
import { ClipboardCopy } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly AccordionToggle integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/clipboard-copy
7-
*/
4+
// Documentation for ClipboardCopy can be found at https://www.patternfly.org/components/clipboard-copy
85

96
figma.connect(
107
ClipboardCopy,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75768&m=dev',
8+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75768',
129
{
1310
props: {
1411
children: figma.children('*')

0 commit comments

Comments
 (0)