@@ -4,6 +4,7 @@ import { denominatorTerm } from '../../utils/denominator-term';
4
4
import { numeratorTerm } from '../../utils/numerator-term' ;
5
5
import { ValidationWrapper } from './validated-wrapper' ;
6
6
import { Rhythm , UnsavedRhythm } from '../../types' ;
7
+ import cc from 'classcat' ;
7
8
8
9
const sharedSelectAndInputClassNames = [
9
10
'text-gray-800' ,
@@ -19,13 +20,13 @@ const inputClassNames = [
19
20
'py-1' ,
20
21
'px-2' ,
21
22
'placeholder-gray-300' ,
22
- ] . join ( ' ' ) ;
23
+ ] ;
23
24
24
25
const selectClassNames = [
25
26
...sharedSelectAndInputClassNames ,
26
27
'p-1' ,
27
28
'w-48' ,
28
- ] . join ( ' ' ) ;
29
+ ] ;
29
30
30
31
const generateNumeratorSelect = (
31
32
selected : string ,
@@ -41,7 +42,7 @@ const generateNumeratorSelect = (
41
42
42
43
return (
43
44
< select
44
- className = { selectClassNames }
45
+ className = { cc ( selectClassNames ) }
45
46
onChange = { onChange }
46
47
aria-label = "Rhythm action count"
47
48
value = { selected }
@@ -65,7 +66,7 @@ const generateDenominatorSelect = (
65
66
66
67
return (
67
68
< select
68
- className = { selectClassNames }
69
+ className = { cc ( selectClassNames ) }
69
70
onChange = { onChange }
70
71
aria-label = "Rhythm action count time span"
71
72
value = { selected }
@@ -188,7 +189,7 @@ export default function RhythmEdit({
188
189
error = { validationResult . errors . action }
189
190
>
190
191
< input
191
- className = { inputClassNames }
192
+ className = { cc ( inputClassNames ) }
192
193
aria-label = "Rhythm action description"
193
194
aria-required = "true"
194
195
placeholder = "get into a rhythm"
@@ -215,7 +216,7 @@ export default function RhythmEdit({
215
216
error = { validationResult . errors . reason }
216
217
>
217
218
< input
218
- className = { inputClassNames }
219
+ className = { cc ( inputClassNames ) }
219
220
aria-label = "Rhythm reason description"
220
221
aria-required = "true"
221
222
placeholder = "it will bring positive change"
0 commit comments