Skip to content

Commit 6872ce2

Browse files
committed
feat(CC-batch-3): updated urls, added required
1 parent 5862c5c commit 6872ce2

9 files changed

Lines changed: 114 additions & 65 deletions

File tree

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,27 @@
1-
import { Banner } from '@patternfly/react-core';
21
import figma from '@figma/code-connect';
3-
4-
/**
5-
* PatternFly Banner integration for Figma Code Connect
6-
*/
2+
import { Banner } from '@patternfly/react-core';
73

84
figma.connect(
95
Banner,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-1443&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-1443',
117
{
128
props: {
9+
// string
1310
text: figma.string('✏️ Center text'),
1411

1512
// enum
1613
color: figma.enum('Color', {
1714
Red: 'red',
1815
Orangered: 'orangered',
1916
Orange: 'orange',
20-
Gold: 'gold',
2117
Green: 'green',
22-
Cyan: 'cyan',
2318
Blue: 'blue',
24-
Purple: 'purple',
25-
Gray: 'gray'
26-
}),
27-
icon: figma.boolean('Icon', {
28-
true: figma.instance('Icon Swap'),
29-
false: undefined
19+
Purple: 'purple'
3020
})
3121
},
3222
example: (props) => (
33-
<Banner color={props.color}>
34-
{props.icon}
35-
{props.text}
36-
</Banner>
23+
// Documentation for Banner can be found at https://www.patternfly.org/components/banner
24+
<Banner color={props.color}>{props.text}</Banner>
3725
)
3826
}
3927
);
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
import { Banner } from '@patternfly/react-core';
21
import figma from '@figma/code-connect';
3-
4-
/**
5-
* PatternFly Banner integration for Figma Code Connect
6-
*/
2+
import { Banner } from '@patternfly/react-core';
73

84
figma.connect(
95
Banner,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-937&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-937',
117
{
128
props: {
139
text: figma.string('✏️ Center text'),
14-
15-
// enum
1610
status: figma.enum('Status', {
1711
Success: 'success',
1812
Warning: 'warning',
@@ -21,6 +15,9 @@ figma.connect(
2115
Custom: 'custom'
2216
})
2317
},
24-
example: (props) => <Banner status={props.status}>{props.text}</Banner>
18+
example: (props) => (
19+
// Documentation for Banner can be found at https://www.patternfly.org/components/banner
20+
<Banner status={props.status}>{props.text}</Banner>
21+
)
2522
}
2623
);
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import figma from '@figma/code-connect';
22
import { Brand } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Logo integration for Figma Code Connect
6-
*/
7-
84
figma.connect(
95
Brand,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2104-3689&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2104-3689',
117
{
12-
example: () => <Brand alt="Brand" />
8+
example: () => (
9+
// Documentation for Brand can be found at https://www.patternfly.org/components/brand
10+
<Brand src={`pfLogo`} alt="Patternfly" widths={{ default: '200px', md: '400px', xl: '600px' }} />
11+
)
1312
}
1413
);
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import figma from '@figma/code-connect';
22
import { Brand } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Logo integration for Figma Code Connect
6-
*/
7-
84
figma.connect(
95
Brand,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2104-3644&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2104-3644',
117
{
12-
example: () => <Brand alt="Brand" />
8+
example: () => (
9+
// Documentation for Brand can be found at https://www.patternfly.org/components/brand
10+
<Brand src={`pfLogo`} alt="Patternfly" widths={{ default: '40px', sm: '60px', md: '220px' }}>
11+
<source media="(min-width: 1200px)" srcSet={`pfLogo`} />
12+
<source media="(min-width: 992px)" srcSet={`pfLogo`} />
13+
<source media="(min-width: 768px)" srcSet={`pfLogo`} />
14+
<source media="(min-width: 576px)" srcSet={`pfLogo`} />
15+
<source media="(min-width: 320px)" srcSet={`pfLogo`} />
16+
<source srcSet={`pfLogo`} />
17+
</Brand>
18+
)
1319
}
1420
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import figma from '@figma/code-connect';
2+
import { Breadcrumb } from '@patternfly/react-core';
3+
4+
figma.connect(
5+
Breadcrumb,
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=3362-283',
7+
{
8+
props: {
9+
children: figma.children('*')
10+
},
11+
example: (props) => (
12+
// Documentation for Breadcrumb can be found at https://www.patternfly.org/components/breadcrumb
13+
<Breadcrumb>{props.children}</Breadcrumb>
14+
)
15+
}
16+
);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import figma from '@figma/code-connect';
2+
import { BreadcrumbItem } from '@patternfly/react-core';
3+
4+
figma.connect(
5+
BreadcrumbItem,
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3362-74',
7+
{
8+
props: {
9+
// string
10+
text: figma.string('Text'),
11+
12+
// enum
13+
// TODO: add isActive
14+
// isActive: figma.enum('State', { 'No link': true }),
15+
to: figma.enum('State', {
16+
Link: '#',
17+
Hover: '#',
18+
'No link': undefined
19+
}),
20+
21+
children: figma.children('*')
22+
},
23+
example: (props) => (
24+
// Documentation for BreadcrumbItem can be found at https://www.patternfly.org/components/breadcrumb
25+
<BreadcrumbItem to={props.to}>
26+
{props.text}
27+
{props.children}
28+
</BreadcrumbItem>
29+
)
30+
}
31+
);
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import figma from '@figma/code-connect';
22
import { BreadcrumbItem } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly BreadcrumbItem integration for Figma Code Connect
6-
*/
7-
84
figma.connect(
95
BreadcrumbItem,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=19922-43760&t=TMTA4Fpy1ljK4qQP-11',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=19922-43760',
117
{
128
props: {
13-
// enums
14-
state: figma.enum('State', {
15-
Clicked: true
16-
})
9+
// enum
10+
// TODO: add isActive
11+
// isActive: figma.enum('State', { 'No link': true }),
12+
13+
children: figma.children('*')
1714
},
18-
example: (props) => <BreadcrumbItem isActive={props.state} isDropdown />
15+
example: (props) => (
16+
// Documentation for BreadcrumbItem can be found at https://www.patternfly.org/components/breadcrumb
17+
<BreadcrumbItem isDropdown>{props.children}</BreadcrumbItem>
18+
)
1919
}
2020
);
Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
import figma from '@figma/code-connect';
2-
import { CodeBlock } from '@patternfly/react-core';
3-
4-
/**
5-
* PatternFly CodeBlock component integration for Figma Code Connect
6-
*/
2+
import { CodeBlock, ExpandableSectionToggle } from '@patternfly/react-core';
73

84
figma.connect(
95
CodeBlock,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9802-5857&t=IzSunfrnw18ti37Y-11',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9802-5857',
117
{
128
props: {
13-
isExpandable: figma.boolean('Expandable'),
14-
children: figma.children('*')
9+
// TODO: FIGMA: configure options for actions
10+
actions: `action1, action2, action3, action4, action5`,
11+
12+
// TODO: FIGMA: configure CodeBlockCode
13+
expandableSection: figma.boolean('Expandable', {
14+
true: (
15+
<ExpandableSectionToggle ontoggle={() => {}} contentId="code-block-id" direction="up">
16+
{isExpanded ? 'Show Less' : 'Show More'}
17+
</ExpandableSectionToggle>
18+
),
19+
false: undefined
20+
})
21+
// children: figma.children('*')
1522
},
16-
example: (props) => <CodeBlock>{props.children}</CodeBlock>
23+
example: (props) => (
24+
// Documentation for CodeBlock can be found at https://www.patternfly.org/components/code-block
25+
<CodeBlock actions={props.actions}>
26+
<CodeBlock>{/* {props.codeBlockCode} */}</CodeBlock>
27+
{props.expandableSection}
28+
</CodeBlock>
29+
)
1730
}
1831
);

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

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

4-
/**
5-
* PatternFly CodeEditor component integration for Figma Code Connect
6-
*/
7-
84
figma.connect(
95
CodeEditor,
10-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=16994-184502&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=16994-184502',
117
{
128
props: {
9+
// TODO: FIGMA: configure options for actions
10+
actions: `action1, action2, action3, action4, action5`,
11+
1312
// boolean
1413
showsLineNumbers: figma.boolean('Show Line Numbers'),
1514

1615
// enum
17-
isEditable: figma.enum('Type', { Editable: true }),
1816
isEmptyState: figma.enum('Type', { 'Empty state': true }),
1917
isMinimapVisible: figma.enum('Type', { 'Mini Map': true })
2018
},
2119
example: (props) => (
20+
// Documentation for CodeEditor can be found at https://www.patternfly.org/components/code-editor
2221
<CodeEditor
22+
actions={props.actions}
2323
emptyState={props.isEmptyState}
24-
isEditable={props.isEditable}
2524
isLineNumbersVisible={props.showsLineNumbers}
2625
isMinimapVisible={props.isMinimapVisible}
2726
/>

0 commit comments

Comments
 (0)