@@ -33,7 +33,6 @@ export default function ConfigurationPanel({
33
33
difficulties : difficultyOptions ,
34
34
topics : topicOptions ,
35
35
} : MatchConfigurationPanelProps ) {
36
-
37
36
const [ difficultyRef , { height : difficultyHeight } ] = useMeasure ( ) ;
38
37
const [ topicsRef , { height : topicsSelectionHeight } ] = useMeasure ( ) ;
39
38
@@ -47,10 +46,6 @@ export default function ConfigurationPanel({
47
46
handleFindMatch,
48
47
} = useFindMatchContext ( ) ;
49
48
50
- const handleDifficultyCheckboxChange = ( text : Difficulty ) => {
51
- setDifficulty ( text ) ;
52
- } ;
53
-
54
49
const handleTopicCheckboxChange = ( text : Category ) => {
55
50
if ( topics . includes ( text ) ) {
56
51
setTopics ( topics . filter ( ( item ) => item !== text ) ) ;
@@ -98,7 +93,7 @@ export default function ConfigurationPanel({
98
93
< div
99
94
ref = { difficultyRef }
100
95
className = { cn (
101
- "grid grid-cols-2 gap-4 z-0 opacity-100 transition-all duration-500" ,
96
+ "z-0 opacity-100 transition-all duration-500" ,
102
97
collapseDifficulties && `-z-10 opacity-0`
103
98
) }
104
99
style = { {
@@ -107,28 +102,38 @@ export default function ConfigurationPanel({
107
102
} px`,
108
103
} }
109
104
>
110
-
111
- < RadioGroup value = { difficulties } onValueChange = { ( selectedValue : Difficulty ) => setDifficulty ( selectedValue ) } >
112
- < div className = "flex flex-row space-x-4" >
113
- { difficultyOptions . map ( ( difficultyOption ) => (
114
- < div key = { difficultyOption } className = "flex items-center space-x-2 p-4" >
115
- < RadioGroupItem
116
- value = { difficultyOption }
117
- id = { difficultyOption }
118
- className = "flex items-center space-x-2" >
119
- < span className = "text-sm font-medium leading-none" > { difficultyOption } </ span >
120
- </ RadioGroupItem >
121
- < label
122
- htmlFor = { difficultyOption }
123
- className = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
124
- >
125
- { difficultyOption }
126
- </ label >
105
+ < RadioGroup
106
+ value = { difficulties }
107
+ onValueChange = { ( selectedValue : Difficulty ) =>
108
+ setDifficulty ( selectedValue )
109
+ }
110
+ className = "flex w-full"
111
+ >
112
+ < div className = "flex flex-row justify-start w-full gap-12" >
113
+ { difficultyOptions . map ( ( difficultyOption ) => (
114
+ < div
115
+ key = { difficultyOption }
116
+ className = "flex flex-row items-center gap-2"
117
+ >
118
+ < RadioGroupItem
119
+ value = { difficultyOption }
120
+ id = { difficultyOption }
121
+ className = "flex items-center space-x-2"
122
+ >
123
+ < span className = "text-sm font-medium leading-none" >
124
+ { difficultyOption }
125
+ </ span >
126
+ </ RadioGroupItem >
127
+ < label
128
+ htmlFor = { difficultyOption }
129
+ className = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
130
+ >
131
+ { difficultyOption }
132
+ </ label >
133
+ </ div >
134
+ ) ) }
127
135
</ div >
128
- ) ) }
129
- </ div >
130
- </ RadioGroup >
131
-
136
+ </ RadioGroup >
132
137
</ div >
133
138
< Button
134
139
onClick = { ( ) => setCollapseTopics ( ! collapseTopics ) }
0 commit comments