Skip to content

Commit 7ffe2f7

Browse files
committed
fix: input layout
1 parent 12cc907 commit 7ffe2f7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/js/components/reusable/Input.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ const inputValidationStyle = (
3232
if (
3333
validate === undefined ||
3434
input === undefined ||
35-
input.toString().length === 0 ||
36-
hasFocus
35+
input.toString().length === 0
3736
) {
37+
if (hasFocus) {
38+
return 'ring-2';
39+
}
40+
3841
return '';
3942
}
4043

4144
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';
4346
}
4447

4548
return '';
@@ -210,7 +213,7 @@ const Textarea = (props: TextAreaProps) => {
210213
hasFocus,
211214
props.required,
212215
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`}
214217
placeholder={props.placeholder}
215218
required={props.required}
216219
onChange={props.onChange}

0 commit comments

Comments
 (0)