Skip to content

Commit babc9c4

Browse files
committed
feat(CC-batch-2): updated docs urls
1 parent 844d2ea commit babc9c4

File tree

10 files changed

+86
-83
lines changed

10 files changed

+86
-83
lines changed
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
import figma from '@figma/code-connect';
22
import { Alert } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
Alert,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2698&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2698',
127
{
138
props: {
9+
// string
1410
title: figma.string('✏️ Title'),
15-
isExpandable: figma.boolean('Expandable', {
16-
true: true,
17-
false: false
18-
}),
11+
description: figma.string('✏️ Title'),
12+
13+
// boolean
14+
isExpandable: figma.boolean('Expandable'),
15+
16+
// enum
1917
variant: figma.enum('Type', {
2018
Info: 'info',
2119
Success: 'success',
@@ -24,6 +22,11 @@ figma.connect(
2422
Custom: 'custom'
2523
})
2624
},
27-
example: (props) => <Alert isExpandable={props.isExpandable} isInline title={props.title} variant={props.variant} />
25+
example: (props) => (
26+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
27+
<Alert isExpandable={props.isExpandable} isInline title={props.title} variant={props.variant}>
28+
{props.description}
29+
</Alert>
30+
)
2831
}
2932
);
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
import figma from '@figma/code-connect';
22
import { AlertGroup } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
AlertGroup,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2780&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2780',
127
{
138
props: {
14-
// children
159
children: figma.children('*')
1610
},
1711
example: (props) => (
18-
<AlertGroup isLiveRegion hasAnimations>
19-
{props.children}
20-
</AlertGroup>
12+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
13+
<AlertGroup>{props.children}</AlertGroup>
2114
)
2215
}
2316
);
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import figma from '@figma/code-connect';
22
import { Alert } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
Alert,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2754&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2754',
127
{
138
props: {
149
// strings
1510
title: figma.string('✏️ Title'),
11+
description: figma.string('✏️ Title'),
1612

1713
// variants
1814
variant: figma.enum('Type', {
@@ -27,7 +23,10 @@ figma.connect(
2723
children: figma.children('*')
2824
},
2925
example: (props) => (
30-
<Alert variant={props.variant} title={props.title} variantLabel={props.variant} isInline isPlain />
26+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
27+
<Alert variant={props.variant} title={props.title} variantLabel={props.variant} isInline isPlain>
28+
{props.description}
29+
</Alert>
3130
)
3231
}
3332
);
Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
import figma from '@figma/code-connect';
22
import { AlertGroup } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
AlertGroup,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2784&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2784',
127
{
138
props: {
149
// strings
1510
overflowMessage: figma.string('✏️ Title'),
1611

17-
children: figma.children('*')
12+
alertGroupOverflowContent: `{alerts.slice(0, maxDisplayed).map(({ key, variant, title }) => (
13+
<Alert
14+
variant={AlertVariant[variant]}
15+
title={title}
16+
actionClose={
17+
<AlertActionsCloseButton
18+
title={title as string}
19+
variantLabel={${variant} alert}
20+
onClose={() => removeAlert(key)}
21+
/>
22+
}
23+
key={key}
24+
/>
25+
))}`
1826
},
19-
example: (props) => <AlertGroup overflowMessage={props.overflowMessage}>{props.children}</AlertGroup>
27+
example: (props) => (
28+
// const alertGroupOverflowContent = {
29+
// maxDisplayed: 4,
30+
// alerts: [
31+
// { key: '1', variant: 'info', title: 'Info alert' },
32+
// { key: '2', variant: 'success', title: 'Success alert' },
33+
// { key: '3', variant: 'warning', title: 'Warning alert' },
34+
// { key: '4', variant: 'danger', title: 'Danger alert' }
35+
// ]
36+
// };
37+
38+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
39+
<AlertGroup>{props.alertGroupOverflowContent}</AlertGroup>
40+
)
2041
}
2142
);
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
import figma from '@figma/code-connect';
22
import { Alert } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
Alert,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2587&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2587',
127
{
138
props: {
9+
// string
1410
title: figma.string('✏️ Title'),
15-
isExpandable: figma.boolean('Expandable', {
16-
true: true,
17-
false: false
18-
}),
11+
description: figma.string('✏️ Title'),
12+
13+
// boolean
14+
isExpandable: figma.boolean('Expandable'),
15+
16+
// enum
1917
variant: figma.enum('Type', {
2018
Custom: 'custom',
2119
Danger: 'danger',
@@ -24,6 +22,11 @@ figma.connect(
2422
Warning: 'warning'
2523
})
2624
},
27-
example: (props) => <Alert title={props.title} variant={props.variant} isExpandable={props.isExpandable} />
25+
example: (props) => (
26+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
27+
<Alert isToast isLiveRegion title={props.title} variant={props.variant} isExpandable={props.isExpandable}>
28+
{props.description}
29+
</Alert>
30+
)
2831
}
2932
);

packages/code-connect/components/Alert/ToastAlertGroup.figma.tsx

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

4-
/**
5-
* PatternFly Alert integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/alert
7-
*/
8-
94
figma.connect(
105
AlertGroup,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2821&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2821',
127
{
138
props: {
149
children: figma.children('*')
1510
},
1611
example: (props) => (
17-
<AlertGroup isToast isLiveRegion hasAnimations>
12+
// Documentation for Alert can be found at https://www.patternfly.org/components/alert
13+
<AlertGroup hasAnimations isToast isLiveRegion>
1814
{props.children}
1915
</AlertGroup>
2016
)

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

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

4-
/**
5-
* PatternFly Avatar integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/avatar
7-
*/
8-
94
figma.connect(
105
Avatar,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=1561-4342&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=1561-4342',
127
{
138
props: {
149
// booleans
@@ -23,6 +18,7 @@ figma.connect(
2318
})
2419
},
2520
example: (props) => (
21+
// Documentation for Avatar can be found at https://www.patternfly.org/components/avatar
2622
<Avatar alt="Avatar" src="/assets/images/avatar.svg" isBordered={props.isBordered} size={props.size} />
2723
)
2824
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import figma from '@figma/code-connect';
22
import { BackToTop } from '@patternfly/react-core';
33

4-
/**
5-
* PatternFly BackToTop integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/back-to-top
7-
*/
8-
94
figma.connect(
105
BackToTop,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1521-958&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1521-958',
127
{
138
props: {
9+
// string
1410
text: figma.string('Text')
1511
},
16-
example: (props) => <BackToTop title={props.text} />
12+
example: (props) => (
13+
// Documentation for BackToTop can be found at https://www.patternfly.org/components/back-to-top
14+
<BackToTop title={props.text} />
15+
)
1716
}
1817
);
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import figma from '@figma/code-connect';
22
import { Backdrop } from '@patternfly/react-core';
33

4-
/**
5-
/**
6-
* PatternFly Backdrop integration for Figma Code Connect
7-
* @patternfly https://www.patternfly.org/components/backdrop
8-
*/
9-
104
figma.connect(
115
Backdrop,
126
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2873-2900&m=dev',
137
{
14-
example: () => <Backdrop />
8+
example: () => (
9+
// Documentation for Backdrop can be found at https://www.patternfly.org/components/backdrop
10+
<Backdrop />
11+
)
1512
}
1613
);

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

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

4-
/**
5-
* PatternFly Badge integration for Figma Code Connect
6-
* @patternfly https://www.patternfly.org/components/badge
7-
*/
8-
94
figma.connect(
105
Badge,
11-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1259-1132&m=dev',
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1259-1132',
127
{
138
props: {
14-
// strings
9+
// string
1510
text: figma.string('Text'),
1611

17-
// enums
12+
// enum
1813
isRead: figma.enum('Type', { Read: true }),
1914
isDisabled: figma.enum('Type', {
2015
disabled: true
2116
})
2217
},
2318
example: (props) => (
24-
<Badge isRead={props.isRead} isDisabled={props.isDisabled} screenReaderText="Badge">
19+
// Documentation for Badge can be found at https://www.patternfly.org/components/badge
20+
<Badge isRead={props.isRead} isDisabled={props.isDisabled} screenReaderText="Badge example">
2521
{props.text}
2622
</Badge>
2723
)

0 commit comments

Comments
 (0)