@@ -12,19 +12,15 @@ figma.connect(
1212 labelText : figma . string ( 'Text' ) ,
1313
1414 // boolean
15- isEditable : figma . boolean ( 'Is Editable' ) ,
16- onEditCancel : figma . boolean ( 'Is Editable' , {
17- true : `{() => {}}` ,
18- false : undefined
19- } ) ,
20- onEditComplete : figma . boolean ( 'Is Editable' , {
21- true : `{() => {}}` ,
22- false : undefined
23- } ) ,
24- editableProps : figma . boolean ( 'Is Editable' , {
15+ isEditable : figma . boolean ( 'Is Editable' , {
2516 true : {
26- 'aria-label' : 'Editable label props' ,
27- id : 'editable-label'
17+ isEditable : true ,
18+ onEditCancel : ( ) => { } , // Callback when an editable label cancels an edit.
19+ onEditComplete : ( ) => { } , // Callback when an editable label completes an edit.
20+ editableProps : {
21+ 'aria-label' : `Editable label with text` ,
22+ id : 'editable-label'
23+ }
2824 } ,
2925 false : undefined
3026 } ) ,
@@ -47,45 +43,10 @@ figma.connect(
4743 children : figma . children ( '*' )
4844 } ,
4945 example : ( props ) => (
50- < Label
51- isCompact = { props . isCompact }
52- isEditable = { props . isEditable }
53- onEditCancel = { props . onEditCancel }
54- onEditComplete = { props . onEditComplete }
55- editableProps = { props . editableProps }
56- color = { props . color }
57- variant = { props . variant }
58- >
46+ < Label isCompact = { props . isCompact } isEditable = { props . isEditable } color = { props . color } variant = { props . variant } >
5947 { props . children }
6048 { props . labelText }
6149 </ Label >
6250 )
6351 }
6452) ;
65-
66- // figma.connect(
67- // Label,
68- // 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2800-609',
69- // {
70- // props: {
71- // // string
72- // text: figma.string('Text'),
73-
74- // // enum
75- // isCompact: figma.enum('Size', { Compact: true }),
76- // variant: figma.enum('Type', { Outlined: 'outline' }),
77- // status: figma.enum('Status', {
78- // Success: 'success',
79- // Warning: 'warning',
80- // Danger: 'danger',
81- // Info: 'info',
82- // Custom: 'custom'
83- // })
84- // },
85- // example: (props) => (
86- // <Label isCompact={props.isCompact} status={props.status} variant={props.variant}>
87- // {props.text}
88- // </Label>
89- // )
90- // }
91- // );
0 commit comments