Skip to content

Commit 1bbee4a

Browse files
committed
feat(CC-batch-7): added SimpleListItem update
1 parent ea3faf8 commit 1bbee4a

File tree

1 file changed

+25
-11
lines changed

1 file changed

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

4+
// TODO: FIGMA: Add support for SimpleListGroup
45
// Documentation for SimpleListItem can be found at https://www.patternfly.org/components/simple-list
56

67
figma.connect(
@@ -9,19 +10,32 @@ figma.connect(
910
{
1011
props: {
1112
text: figma.string('Text'),
12-
state: figma.enum('State', {
13-
Default: undefined,
14-
'Hover - Light': 'hover---light',
15-
'Hover - Dark': 'hover---dark',
16-
'Selected - Light': 'selected---light',
17-
'Selected - Dark': 'selected---dark',
18-
Disabled: 'disabled'
13+
14+
// enum
15+
isActive: figma.enum('State', {
16+
'Selected - Light': true,
17+
'Selected - Dark': true
1918
}),
20-
type: figma.enum('Type', {
21-
Default: undefined,
22-
Link: 'link'
19+
isLink: figma.enum('Type', {
20+
Default: {
21+
component: undefined,
22+
href: undefined
23+
},
24+
Link: {
25+
component: 'a',
26+
href: '#'
27+
}
2328
})
2429
},
25-
example: (props) => <SimpleListItem>{props.text}</SimpleListItem>
30+
example: (props) => (
31+
<SimpleListItem
32+
component={props.isLink.component}
33+
href={props.isLink.href}
34+
isActive={props.isActive}
35+
key="simple-list-key"
36+
>
37+
{props.text}
38+
</SimpleListItem>
39+
)
2640
}
2741
);

0 commit comments

Comments
 (0)