Skip to content

Commit

Permalink
do as in textfield
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Apr 19, 2024
1 parent 350c4c0 commit 75953ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/css/react-css-modules.css
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@
border-color: var(--fds-semantic-border-neutral-default);
}

.fds-textarea-textarea-3d0e29bc[aria-invalid='true']:not(:focus-visible) {
.fds-textarea-error-3d0e29bc > .fds-textarea-textarea-3d0e29bc:not(:focus-visible) {
border-color: var(--fds-semantic-border-danger-default);
box-shadow: inset 0 0 0 1px var(--fds-semantic-border-danger-default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
border-color: var(--fds-semantic-border-neutral-default);
}

.textarea[aria-invalid='true']:not(:focus-visible) {
.error > .textarea:not(:focus-visible) {
border-color: var(--fds-semantic-border-danger-default);
box-shadow: inset 0 0 0 1px var(--fds-semantic-border-danger-default);
}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/form/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
classes.formField,
textareaProps.disabled && classes.disabled,
readOnly && classes.readonly,
hasError && classes.error,
className,
)}
>
Expand Down

0 comments on commit 75953ea

Please sign in to comment.