Skip to content

Commit 621d652

Browse files
committed
Fix focusring on disabled inputs
1 parent d54a871 commit 621d652

File tree

1 file changed

+3
-2
lines changed
  • resources/scripts/components/elements

1 file changed

+3
-2
lines changed

resources/scripts/components/elements/Input.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const inputStyle = css<Props>`
3939
resize: none;
4040
${tw`appearance-none outline-none w-full min-w-0`};
4141
${tw`p-3 border-2 rounded text-sm transition-all duration-150`};
42-
${tw`bg-neutral-600 border-neutral-500 hover:border-neutral-400 text-neutral-200 shadow-none`};
42+
${tw`bg-neutral-600 border-neutral-500 hover:border-neutral-400 text-neutral-200 shadow-none focus:ring-0`};
4343
4444
& + .input-help {
4545
${tw`mt-1 text-xs`};
@@ -52,14 +52,15 @@ const inputStyle = css<Props>`
5252
5353
&:not(:disabled):not(:read-only):focus {
5454
${tw`shadow-md border-primary-300 ring-2 ring-primary-400 ring-opacity-50`};
55+
${props => props.hasError && tw`border-red-300 ring-red-200`};
5556
}
5657
5758
&:disabled {
5859
${tw`opacity-75`};
5960
}
6061
6162
${props => props.isLight && light};
62-
${props => props.hasError && tw`text-red-100 border-red-400 hover:border-red-300 focus:border-red-300! focus:ring-red-200!`};
63+
${props => props.hasError && tw`text-red-100 border-red-400 hover:border-red-300`};
6364
`;
6465

6566
const Input = styled.input<Props>`

0 commit comments

Comments
 (0)