feat: style invalid input
This commit is contained in:
parent
08f81b743d
commit
4b91c06761
1 changed files with 5 additions and 1 deletions
|
|
@ -24,12 +24,16 @@ export function Input({
|
||||||
return (
|
return (
|
||||||
<FormControl w="$full" mb="$4" isInvalid={invalid}>
|
<FormControl w="$full" mb="$4" isInvalid={invalid}>
|
||||||
<GSInput
|
<GSInput
|
||||||
|
isInvalid={invalid}
|
||||||
h="$14"
|
h="$14"
|
||||||
borderColor="$gray700"
|
borderColor="$gray700"
|
||||||
borderWidth="$1"
|
borderWidth="$1"
|
||||||
borderRadius="$md"
|
borderRadius="$md"
|
||||||
$focus={{
|
$focus={{
|
||||||
borderColor: '$green500',
|
borderColor: invalid ? '$red500' : '$green500',
|
||||||
|
}}
|
||||||
|
$invalid={{
|
||||||
|
borderColor: '$red500',
|
||||||
}}
|
}}
|
||||||
isReadOnly={isReadOnly}
|
isReadOnly={isReadOnly}
|
||||||
opacity={isReadOnly ? 0.5 : 1}>
|
opacity={isReadOnly ? 0.5 : 1}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue