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 11import figma from '@figma/code-connect' ;
22import { 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
67figma . 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) ;
You can’t perform that action at this time.
0 commit comments