Skip to content

Commit c125345

Browse files
committed
feat(CC-batch-2): added batch 2
1 parent 2aa6dc4 commit c125345

10 files changed

+256
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import figma from '@figma/code-connect';
2+
import { Alert } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Alert component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Alert,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2698&m=dev',
11+
{
12+
props: {
13+
// boolean
14+
description: figma.boolean('Description', {
15+
true: figma.string('✏️ Description'),
16+
false: undefined
17+
}),
18+
hasActions: figma.boolean('Actions'),
19+
isDismissable: figma.boolean('Dismissable'),
20+
isExpandable: figma.boolean('Expandable'),
21+
22+
// string
23+
title: figma.string('✏️ Title'),
24+
25+
// enum
26+
variant: figma.enum('Type', {
27+
Info: 'info',
28+
Success: 'success',
29+
Warning: 'warning',
30+
Danger: 'danger',
31+
Custom: 'custom'
32+
})
33+
},
34+
example: (props) => (
35+
<Alert
36+
actionClose={props.isDismissable}
37+
actionLinks={props.hasActions}
38+
isExpandable={props.isExpandable}
39+
isInline
40+
title={props.title}
41+
variant={props.variant}
42+
>
43+
{props.description}
44+
</Alert>
45+
)
46+
}
47+
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import figma from '@figma/code-connect';
2+
import { AlertGroup } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Alert component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
AlertGroup,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2780&m=dev',
11+
{
12+
props: { children: figma.children('*') },
13+
example: (props) => <AlertGroup>{props.children}</AlertGroup>
14+
}
15+
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import figma from '@figma/code-connect';
2+
import { Alert } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Alert component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Alert,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2754&m=dev',
11+
{
12+
props: {
13+
// string
14+
title: figma.string('✏️ Title'),
15+
16+
// enum
17+
variant: figma.enum('Type', {
18+
Info: 'info',
19+
Success: 'success',
20+
Warning: 'warning',
21+
Danger: 'danger',
22+
Custom: 'custom'
23+
}),
24+
25+
// children
26+
children: figma.children('*')
27+
},
28+
example: (props) => (
29+
<Alert variant={props.variant} title={props.title} variantLabel={props.variant} isInline isPlain />
30+
)
31+
}
32+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import figma from '@figma/code-connect';
2+
import { Alert } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Alert component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Alert,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2784&m=dev',
11+
{
12+
props: {
13+
// string
14+
title: figma.string('✏️ Title'),
15+
16+
children: figma.children('*')
17+
},
18+
example: (props) => <Alert title={props.title}>{props.children}</Alert>
19+
}
20+
);
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import figma from '@figma/code-connect';
2+
import { Alert } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Alert component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Alert,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2587&m=dev',
11+
{
12+
props: {
13+
// string
14+
title: figma.string('✏️ Title'),
15+
16+
// boolean
17+
actionLinks: figma.boolean('Actions'),
18+
alertDescription: figma.boolean('Description', {
19+
true: figma.string('✏️ Description'),
20+
false: undefined
21+
}),
22+
isExpandable: figma.boolean('Expandable'),
23+
24+
// enum
25+
variant: figma.enum('Type', {
26+
Custom: 'custom',
27+
Danger: 'danger',
28+
Info: 'info',
29+
Success: 'success',
30+
Warning: 'warning'
31+
})
32+
},
33+
example: (props) => (
34+
<Alert
35+
title={props.title}
36+
variant={props.variant}
37+
actionLinks={props.actionLinks}
38+
isExpandable={props.isExpandable}
39+
>
40+
{props.alertDescription}
41+
</Alert>
42+
)
43+
}
44+
);
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 { AlertGroup } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly AlertGroup component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
AlertGroup,
10+
"https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2821&m=dev",
11+
{
12+
props: {
13+
children: figma.children('*')
14+
},
15+
example: (props) => <AlertGroup>{props.children}</AlertGroup>
16+
}
17+
);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import figma from '@figma/code-connect';
2+
import { Avatar } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Avatar component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Avatar,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=1561-4342&m=dev',
11+
{
12+
props: {
13+
// boolean
14+
isBordered: figma.boolean('Bordered'),
15+
16+
// enum
17+
size: figma.enum('Size', {
18+
small: 'sm',
19+
med: 'md',
20+
lg: 'lg',
21+
XL: 'xl'
22+
})
23+
},
24+
example: (props) => (
25+
<Avatar alt="Avatar" src="/assets/images/avatar.svg" isBordered={props.isBordered} size={props.size} />
26+
)
27+
}
28+
);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { BackToTop } from '@patternfly/react-core';
2+
import figma from '@figma/code-connect';
3+
4+
figma.connect(
5+
BackToTop,
6+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1521-958&m=dev',
7+
{
8+
props: {
9+
// strings
10+
text: figma.string('Text')
11+
},
12+
example: (props) => <BackToTop title={props.text} />
13+
}
14+
);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import figma from '@figma/code-connect';
2+
import { Backdrop } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Backdrop component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Backdrop,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2873-2900&m=dev',
11+
{
12+
example: () => <Backdrop />
13+
}
14+
);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import figma from '@figma/code-connect';
2+
import { Badge } from '@patternfly/react-core';
3+
4+
/**
5+
* PatternFly Badge component integration for Figma Code Connect
6+
*/
7+
8+
figma.connect(
9+
Badge,
10+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1259-1132&m=dev',
11+
{
12+
props: {
13+
// strings
14+
title: figma.string('Text', '00'),
15+
16+
// enums
17+
type: figma.enum('Type', {
18+
Unread: undefined,
19+
Read: false,
20+
disable: false
21+
})
22+
},
23+
example: (props) => <Badge title={props.title} type={props.type} />
24+
}
25+
);

0 commit comments

Comments
 (0)