Skip to content

Commit dbf3c61

Browse files
committed
feat(CC-batch-1): moved CC out of react-core
1 parent 0cea815 commit dbf3c61

File tree

9 files changed

+54
-113
lines changed

9 files changed

+54
-113
lines changed

packages/react-core/codeConnect/components/AboutModal/AboutModal.figma.tsx renamed to packages/code-connect/components/AboutModal/AboutModal.figma.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ import { AboutModal } from '@patternfly/react-core';
77

88
figma.connect(
99
AboutModal,
10-
'https://www.figma.com/file/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=5047-695',
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2879-13973&t=15CEJpGgVui7qP5Q-11',
1111
{
1212
props: {
13-
// static
14-
backgroundImageSrc: '/assets/images/background.png',
15-
brandImageAlt: 'Brand Image Alt Text',
16-
brandImageSrc: 'Brand Image Source',
17-
trademark: 'Copyright © 2024',
18-
1913
// string
2014
productName: figma.string('Product name'),
2115

16+
trademark: 'Copyright © 2024',
17+
brandImageSrc: 'Brand Image Source',
18+
brandImageAlt: 'Brand Image Alt Text',
19+
backgroundImageSrc: '/assets/images/background.png',
20+
2221
// children
2322
children: figma.children('*')
2423
},

packages/react-core/codeConnect/components/Accordion/Accordion.figma.tsx renamed to packages/code-connect/components/Accordion/Accordion.figma.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ figma.connect(
1010
'https://www.figma.com/file/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2621-623',
1111
{
1212
props: {
13-
// enum
14-
displaySize: figma.enum('Type', { 'Large Bordered': 'lg' }),
15-
isBordered: figma.enum('Type', { Bordered: true, 'Large Bordered': true }),
16-
togglePosition: figma.enum('Caret position', { Left: 'start' }),
13+
// enums
14+
isBordered: figma.enum('Type', {
15+
Bordered: true,
16+
'Large Bordered': true
17+
}),
18+
displaySize: figma.enum('Type', {
19+
'Large Bordered': 'lg'
20+
}),
21+
togglePosition: figma.enum('Caret position', {
22+
Left: 'start'
23+
}),
1724

1825
children: figma.children('*')
1926
},
2027
example: (props) => (
21-
<Accordion isBordered={props.isBordered} displaySize={props.displaySize}>
28+
<Accordion togglePosition={props.togglePosition} isBordered={props.isBordered} displaySize={props.displaySize}>
2229
{props.children}
2330
</Accordion>
2431
)

packages/react-core/codeConnect/components/Accordion/AccordionToggle.figma.tsx renamed to packages/code-connect/components/Accordion/AccordionToggle.figma.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@ figma.connect(
1010
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1423-687&m=dev',
1111
{
1212
props: {
13-
// strings
13+
// string
1414
expandText: figma.string('Expand Text'),
1515

1616
// enums
17-
toggleText: figma.enum('Type', {
18-
Regular: figma.string('Toggle Text'),
19-
'Large Bordered': figma.string('Toggle Text Large')
17+
toggleTextExpanded: figma.enum('State', {
18+
Default: figma.string('Toggle Text'),
19+
Hover: figma.string('Toggle Text'),
20+
Expanded: figma.string('Toggle Text Expanded')
21+
}),
22+
23+
// enum
24+
isExpanded: figma.enum('State', {
25+
Expanded: true
2026
}),
21-
isExpanded: figma.enum('State', { Expanded: true }),
2227

2328
children: figma.children('*')
2429
},
2530
example: (props) => (
2631
<AccordionItem isExpanded={props.isExpanded}>
27-
<AccordionToggle>{props.toggleText}</AccordionToggle>
32+
<AccordionToggle>{props.toggleTextExpanded}</AccordionToggle>
2833
<AccordionContent>
2934
<p>{props.expandText}</p>
3035
</AccordionContent>

packages/react-core/codeConnect/components/ClipboardCopy/ClipboardCopyBasic.figma.tsx renamed to packages/code-connect/components/ClipboardCopy/ClipboardCopyBasic.figma.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ import { ClipboardCopy } from '@patternfly/react-core';
66
*/
77

88
figma.connect(
9-
ClipboardCopyBasic,
9+
ClipboardCopy,
1010
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75835&m=dev',
1111
{
1212
props: {
13-
// boolean
14-
expandable: figma.boolean('Expandable'),
15-
1613
// enum
17-
isExpanded: figma.enum('State', { Expanded: true }),
14+
isActive: figma.enum('State', { Active: true }),
1815
isReadOnly: figma.enum('State', { 'Read only': true }),
16+
isExpanded: figma.enum('State', { Expanded: true }),
1917

2018
children: figma.children('*')
2119
},
22-
example: (props) => <ClipboardCopy children={props.children} />
20+
example: (props) => (
21+
<ClipboardCopy isReadOnly={props.isReadOnly} isExpanded={props.isExpanded} isActive={props.isActive}>
22+
{props.children}
23+
</ClipboardCopy>
24+
)
2325
}
2426
);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import figma from '@figma/code-connect';
2+
import { ClipboardCopy } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly ClipboardCopyInlineCompact component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
ClipboardCopy,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75768&m=dev',
11+
{
12+
props: {
13+
children: figma.children('*')
14+
},
15+
example: (props) => <ClipboardCopy variant="inline-compact">{props.children}</ClipboardCopy>
16+
}
17+
);

packages/react-core/codeConnect/components/Avatar/Avatar.figma.tsx

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/react-core/codeConnect/components/ClipboardCopy/ClipboardCopyInlineCompact.figma.tsx

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)