forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseComponentsToggleGroupsParts.figma.tsx
More file actions
37 lines (34 loc) · 1.03 KB
/
Copy pathBaseComponentsToggleGroupsParts.figma.tsx
File metadata and controls
37 lines (34 loc) · 1.03 KB
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
import figma from '@figma/code-connect';
import { ToggleGroupItem } from '@patternfly/react-core';
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
// Documentation for Spinner can be found at https://www.patternfly.org/components/spinner
figma.connect(
ToggleGroupItem,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2089-5606&m=dev',
{
props: {
// boolean
icon: figma.boolean('Has icon', {
true: <BellIcon />,
false: undefined
}),
text: figma.boolean('Has text', {
true: figma.string('Text'),
false: undefined
}),
// enum
isDisabled: figma.enum('State', { Disabled: true }),
isSelected: figma.enum('State', { Selected: true })
},
example: (props) => (
<ToggleGroupItem
buttonId="toggle-group-single"
icon={props.icon}
isDisabled={props.isDisabled}
isSelected={props.isSelected}
text={props.text}
onChange={() => {}}
/>
)
}
);