1
- import React from 'react' ;
1
+ "use client"
2
2
3
- import { Label } from '@/components/ui/label' ;
4
- import {
5
- Select ,
6
- SelectContent ,
7
- SelectItem ,
8
- SelectTrigger ,
9
- SelectValue ,
10
- } from '@/components/ui/select' ;
11
- import { Switch } from '@/components/ui/switch' ;
12
- import { TreeCustomizationOptions } from '@/types/tree-customization' ;
3
+ import type React from "react"
4
+
5
+ import { Label } from "@/components/ui/label"
6
+ import { Select , SelectContent , SelectItem , SelectTrigger , SelectValue } from "@/components/ui/select"
7
+ import { Switch } from "@/components/ui/switch"
8
+ import type { TreeCustomizationOptions } from "@/types/tree-customization"
13
9
14
10
interface CustomizationOptionsProps {
15
- options : TreeCustomizationOptions ;
16
- onChange : ( newOptions : Partial < TreeCustomizationOptions > ) => void ;
11
+ options : TreeCustomizationOptions
12
+ onChange : ( newOptions : Partial < TreeCustomizationOptions > ) => void
17
13
}
18
14
19
- const CustomizationOptions : React . FC < CustomizationOptionsProps > = ( {
20
- options,
21
- onChange,
22
- } ) => {
15
+ const CustomizationOptions : React . FC < CustomizationOptionsProps > = ( { options, onChange } ) => {
23
16
return (
24
17
< div className = "space-y-4" >
25
18
< div className = "flex items-center justify-between" >
26
19
< Label htmlFor = "ascii-style" > ASCII Style</ Label >
27
20
< Select
28
21
value = { options . asciiStyle }
29
- onValueChange = { ( value ) =>
30
- onChange ( { asciiStyle : value as 'basic' | 'detailed' | 'minimal' } )
31
- }
22
+ onValueChange = { ( value ) => onChange ( { asciiStyle : value as "basic" | "detailed" | "minimal" } ) }
32
23
>
33
24
< SelectTrigger className = "w-[180px]" >
34
25
< SelectValue placeholder = "Select ASCII style" />
@@ -46,7 +37,7 @@ const CustomizationOptions: React.FC<CustomizationOptionsProps> = ({
46
37
< Switch
47
38
id = "use-icons"
48
39
checked = { options . useIcons }
49
- onCheckedChange = { ( checked ) => onChange ( { useIcons : checked } ) }
40
+ onCheckedChange = { ( checked : boolean ) => onChange ( { useIcons : checked } ) }
50
41
/>
51
42
</ div >
52
43
@@ -55,11 +46,11 @@ const CustomizationOptions: React.FC<CustomizationOptionsProps> = ({
55
46
< Switch
56
47
id = "show-line-numbers"
57
48
checked = { options . showLineNumbers }
58
- onCheckedChange = { ( checked ) => onChange ( { showLineNumbers : checked } ) }
49
+ onCheckedChange = { ( checked : boolean ) => onChange ( { showLineNumbers : checked } ) }
59
50
/>
60
51
</ div >
61
52
</ div >
62
- ) ;
63
- } ;
53
+ )
54
+ }
64
55
65
- export default CustomizationOptions ;
56
+ export default CustomizationOptions
0 commit comments