File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
packages/docs-app/src/examples/core-examples/common Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,14 @@ interface AlignmentSelectProps {
1818 onChange : ( align : TextAlignment ) => void ;
1919}
2020
21- export const TextAlignmentSelect : React . FC < AlignmentSelectProps > = ( { align, label = "Align text" , onChange } ) => {
22- const handleChange = React . useCallback ( ( value : string ) => onChange ( value as TextAlignment ) , [ onChange ] ) ;
23- return (
24- < FormGroup label = { label } >
25- < SegmentedControl fill = { true } options = { options } onValueChange = { handleChange } size = "small" value = { align } />
26- </ FormGroup >
27- ) ;
28- } ;
21+ export const TextAlignmentSelect : React . FC < AlignmentSelectProps > = ( { align, label = "Align text" , onChange } ) => (
22+ < FormGroup label = { label } >
23+ < SegmentedControl < TextAlignment >
24+ fill = { true }
25+ options = { options }
26+ onValueChange = { onChange }
27+ size = "small"
28+ value = { align }
29+ />
30+ </ FormGroup >
31+ ) ;
You can’t perform that action at this time.
0 commit comments