File tree 1 file changed +7
-4
lines changed
src/js/components/reusable
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,17 @@ const inputValidationStyle = (
32
32
if (
33
33
validate === undefined ||
34
34
input === undefined ||
35
- input . toString ( ) . length === 0 ||
36
- hasFocus
35
+ input . toString ( ) . length === 0
37
36
) {
37
+ if ( hasFocus ) {
38
+ return 'ring-2' ;
39
+ }
40
+
38
41
return '' ;
39
42
}
40
43
41
44
if ( ! validate ( input ) ) {
42
- return 'bg-red-50 border-red-500 text-red-900 placeholder-red-700 focus:border-red-500' ;
45
+ return 'ring-2 ring-red-500 bg-red-50 border-red-500 text-red-900 placeholder-red-700 focus:border-red-500' ;
43
46
}
44
47
45
48
return '' ;
@@ -210,7 +213,7 @@ const Textarea = (props: TextAreaProps) => {
210
213
hasFocus ,
211
214
props . required ,
212
215
props . disabled ,
213
- ) } block p-2.5 w-full text-sm text-text bg-white rounded-lg border border-gray-300 focus:ring-band focus:border-brand focus-visible:outline-none`}
216
+ ) } block p-2.5 w-full text-sm text-text bg-white rounded-lg border border-gray-300 focus:ring-brand focus:border-brand focus-visible:outline-none`}
214
217
placeholder = { props . placeholder }
215
218
required = { props . required }
216
219
onChange = { props . onChange }
You can’t perform that action at this time.
0 commit comments