11import figma from '@figma/code-connect' ;
2- import { Drawer } from '@patternfly/react-core' ;
3-
4- /**
5- * PatternFly Drawer component integration for Figma Code Connect
6- */
2+ import { Drawer , DrawerContent , DrawerContentBody } from '@patternfly/react-core' ;
73
84figma . connect (
95 Drawer ,
@@ -12,18 +8,38 @@ figma.connect(
128 props : {
139 // boolean
1410 isExpanded : figma . boolean ( 'Show Footer actions' ) ,
15- isInline : figma . enum ( 'Type' , { Inline : true } ) ,
1611 isResizable : figma . boolean ( 'Is resizable' ) ,
17- isStatic : figma . boolean ( 'Has action icon' ) ,
1812
1913 // enum
20- isLeft : figma . enum ( 'Position' , { Left : 'start' } ) ,
14+ isInline : figma . enum ( 'Type' , {
15+ Overlay : undefined ,
16+ Inline : true
17+ } ) ,
18+ position : figma . enum ( 'Position' , {
19+ 'Left In Main Content Area' : 'start' ,
20+ 'Right - Full Page' : undefined ,
21+ 'Left - Full Page' : 'start' ,
22+ 'Right Full Page' : undefined ,
23+ 'Bottom Full Page' : 'end' ,
24+ 'Bottom In Main Content Area' : 'end' ,
25+ 'Right In Main Content Area' : undefined
26+ } ) ,
2127
22- children : figma . children ( '*' )
28+ panelContent : figma . children ( '*' )
2329 } ,
2430 example : ( props ) => (
25- < Drawer isExpanded = { props . isExpanded } isInline = { props . isInline } isStatic = { props . isStatic } position = { props . isLeft } >
26- { props . children }
31+ // Documentation for Drawer can be found at https://www.patternfly.org/components/drawer
32+ < Drawer
33+ id = "<drawer-id>"
34+ isExpanded = { props . isExpanded }
35+ isInline = { props . isInline }
36+ position = { props . position }
37+ onResize = { ( ) => { } }
38+ onExpand = { ( ) => { } }
39+ >
40+ < DrawerContent panelContent = { props . panelContent } >
41+ < DrawerContentBody > Drawer content</ DrawerContentBody >
42+ </ DrawerContent >
2743 </ Drawer >
2844 )
2945 }
0 commit comments