-
Notifications
You must be signed in to change notification settings - Fork 363
/
Copy pathBanner.figma.tsx
47 lines (45 loc) · 1.08 KB
/
Banner.figma.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { Banner } from 'src/components/Banner';
import figma from '@figma/code-connect';
/** Status banner example */
figma.connect(
Banner,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-937&m=dev',
{
props: {
status: figma.enum('Status', {
Success: 'success',
Warning: 'warning',
Danger: 'danger',
Info: 'info',
Custom: 'custom'
})
},
example: (props) => {
<Banner status={props.status} />;
}
}
);
/** Non-Status banner example */
figma.connect(
Banner,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=221-1443&m=dev',
{
props: {
className: figma.className([]),
color: figma.enum('Color', {
Red: 'red',
Orangered: 'orangered',
Orange: 'orange',
Gold: 'gold',
Green: 'green',
Cyan: 'cyan',
Blue: 'blue',
Purple: 'purple',
Gray: 'gray'
})
},
example: (props) => {
<Banner color={props.color} />;
}
}
);