Skip to content

Commit 8c034f0

Browse files
committed
feat(CC-batch-1): updated props
1 parent 9f6488f commit 8c034f0

6 files changed

Lines changed: 40 additions & 22 deletions

File tree

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,21 @@ figma.connect(
1313
// string
1414
productName: figma.string('Product name'),
1515

16+
trademark: 'Copyright © 2024',
17+
brandImageSrc: 'Brand Image Source',
18+
brandImageAlt: 'Brand Image Alt Text',
19+
backgroundImageSrc: '/assets/images/background.png',
20+
21+
// children
1622
children: figma.children('*')
1723
},
1824
example: (props) => (
1925
<AboutModal
2026
productName={props.productName}
21-
trademark="Copyright © 2024"
22-
brandImageSrc="Brand Image Source"
23-
brandImageAlt="Brand Image Alt Text"
24-
backgroundImageSrc="/assets/images/background.png"
27+
trademark={props.trademark}
28+
brandImageSrc={props.brandImageSrc}
29+
brandImageAlt={props.brandImageAlt}
30+
backgroundImageSrc={props.backgroundImageSrc}
2531
>
2632
{props.children}
2733
</AboutModal>

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

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

44
/**
5-
* PatternFly Accordion component integration for Figma Code Connect
5+
* PatternFly AccordionToggle integration for Figma Code Connect
6+
* @patternfly https://www.patternfly.org/components/accordion
67
*/
78

89
figma.connect(
@@ -11,13 +12,13 @@ figma.connect(
1112
{
1213
props: {
1314
// enum
14-
displaySize: figma.enum('Type', {
15-
'Large Bordered': 'lg'
16-
}),
1715
isBordered: figma.enum('Type', {
1816
Bordered: true,
1917
'Large Bordered': true
2018
}),
19+
displaySize: figma.enum('Type', {
20+
'Large Bordered': 'lg'
21+
}),
2122
togglePosition: figma.enum('Caret position', {
2223
Left: 'start'
2324
}),

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@ import figma from '@figma/code-connect';
22
import { AccordionItem, AccordionToggle, AccordionContent } from '@patternfly/react-core';
33

44
/**
5-
* PatternFly Accordion component integration for Figma Code Connect
5+
* PatternFly AccordionToggle integration for Figma Code Connect
6+
* @patternfly https://www.patternfly.org/components/accordion
67
*/
78

89
figma.connect(
910
AccordionToggle,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1423-687&m=dev',
11+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1423-687',
1112
{
1213
props: {
1314
// string
1415
expandText: figma.string('Expand Text'),
1516

16-
// enums
17+
// enum
1718
toggleTextExpanded: figma.enum('State', {
1819
Default: figma.string('Toggle Text'),
1920
Hover: figma.string('Toggle Text'),
2021
Expanded: figma.string('Toggle Text Expanded')
2122
}),
22-
23-
// enum
24-
isExpanded: figma.enum('State', {
25-
Expanded: true
26-
}),
23+
isExpanded: figma.enum('State', { Expanded: true }),
2724

2825
children: figma.children('*')
2926
},
3027
example: (props) => (
3128
<AccordionItem isExpanded={props.isExpanded}>
32-
<AccordionToggle>{props.toggleTextExpanded}</AccordionToggle>
33-
<AccordionContent>
29+
<AccordionToggle onClick={() => {}} id="<your-id>">
30+
{props.toggleTextExpanded}
31+
</AccordionToggle>
32+
<AccordionContent id="accordion-content-example">
3433
<p>{props.expandText}</p>
3534
</AccordionContent>
3635
</AccordionItem>

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

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

44
/**
5-
* PatternFly ActionList integration for Figma Code Connect
5+
* PatternFly AccordionToggle integration for Figma Code Connect
6+
* @patternfly https://www.patternfly.org/components/action-list
67
*/
78

89
figma.connect(
910
ActionList,
1011
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6780-15839&m=dev',
1112
{
1213
props: {
14+
isIconList: figma.enum('Type', { 'Action icons only': true }),
1315
children: figma.children('*')
1416
},
15-
example: (props) => <ActionList>{props.children}</ActionList>
17+
example: (props) => <ActionList isIconList={props.isIconList}>{props.children}</ActionList>
1618
}
1719
);

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

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

44
/**
5-
* PatternFly BackgroundImage component integration for Figma Code Connect
5+
* PatternFly AccordionToggle integration for Figma Code Connect
6+
* @patternfly https://www.patternfly.org/components/background-image
67
*/
78

89
figma.connect(

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,20 @@ figma.connect(
1414
isActive: figma.enum('State', { Active: true }),
1515
isReadOnly: figma.enum('State', { 'Read only': true }),
1616
isExpanded: figma.enum('State', { Expanded: true }),
17+
expansion: figma.enum('State', {
18+
Expanded: 'expansion',
19+
false: undefined
20+
}),
1721

1822
children: figma.children('*')
1923
},
2024
example: (props) => (
21-
<ClipboardCopy isReadOnly={props.isReadOnly} isExpanded={props.isExpanded} isActive={props.isActive}>
25+
<ClipboardCopy
26+
isReadOnly={props.isReadOnly}
27+
variant={props.expansion}
28+
isExpanded={props.isExpanded}
29+
isActive={props.isActive}
30+
>
2231
{props.children}
2332
</ClipboardCopy>
2433
)

0 commit comments

Comments
 (0)