File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed
packages/code-connect/components/SimpleList Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change 1
1
import figma from '@figma/code-connect' ;
2
2
import { SimpleListItem } from '@patternfly/react-core' ;
3
3
4
+ // TODO: FIGMA: Add support for SimpleListGroup
4
5
// Documentation for SimpleListItem can be found at https://www.patternfly.org/components/simple-list
5
6
6
7
figma . connect (
@@ -9,19 +10,32 @@ figma.connect(
9
10
{
10
11
props : {
11
12
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
19
18
} ) ,
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
+ }
23
28
} )
24
29
} ,
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
+ )
26
40
}
27
41
) ;
You can’t perform that action at this time.
0 commit comments