@@ -3,9 +3,10 @@ import { HorizontalSplit, PreviewLayout, ResponsiveLayout, VerticalSplit } from
3
3
import { UseResponsiveView } from '@/src/hooks/useResponsiveView'
4
4
import { css , cx } from '@/styled-system/css'
5
5
import { button , segmentGroup } from '@/styled-system/recipes'
6
- import { SegmentGroup } from '@ark-ui/react'
6
+ import { SegmentGroup } from '@ark-ui/react/segment-group '
7
7
8
8
export type Layout = 'horizontal' | 'vertical' | 'preview' | 'responsive'
9
+
9
10
export type LayoutControlProps = {
10
11
value : Layout
11
12
onChange : ( layout : Layout ) => void
@@ -14,13 +15,14 @@ export type LayoutControlProps = {
14
15
isResponsive : boolean
15
16
}
16
17
18
+ const options = [
19
+ { id : 'horizontal' , label : 'Horizontal' , icon : < HorizontalSplit /> } ,
20
+ { id : 'vertical' , label : 'Vertical' , icon : < VerticalSplit /> } ,
21
+ { id : 'preview' , label : 'Preview' , icon : < PreviewLayout /> } ,
22
+ ]
23
+
17
24
export const LayoutControl = ( props : LayoutControlProps ) => {
18
25
const { value, onChange, setResponsiveSize, breakpoints, isResponsive } = props
19
- const options = [
20
- { id : 'horizontal' , label : 'Horizontal' , icon : < HorizontalSplit /> } ,
21
- { id : 'vertical' , label : 'Vertical' , icon : < VerticalSplit /> } ,
22
- { id : 'preview' , label : 'Preview' , icon : < PreviewLayout /> } ,
23
- ]
24
26
return (
25
27
< SegmentGroup . Root
26
28
className = { cx (
@@ -55,6 +57,7 @@ export const LayoutControl = (props: LayoutControlProps) => {
55
57
>
56
58
< SegmentGroup . ItemText > { option . icon } </ SegmentGroup . ItemText >
57
59
< SegmentGroup . ItemControl />
60
+ < SegmentGroup . ItemHiddenInput />
58
61
</ SegmentGroup . Item >
59
62
) ) }
60
63
< div
0 commit comments