Skip to content

Commit fd7ef01

Browse files
committed
refactor(ui-form-field): remove border from new form errors
1 parent 494ead6 commit fd7ef01

File tree

1 file changed

+7
-1
lines changed
  • packages/ui-form-field/src/FormFieldGroup

1 file changed

+7
-1
lines changed

packages/ui-form-field/src/FormFieldGroup/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ class FormFieldGroup extends Component<FormFieldGroupProps> {
7777
}
7878

7979
get makeStylesVariables(): FormFieldGroupStyleProps {
80-
return { invalid: this.invalid }
80+
// new form errors dont need borders
81+
const oldInvalid =
82+
!!this.props.messages &&
83+
this.props.messages.findIndex((message) => {
84+
return message.type === 'error'
85+
}) >= 0
86+
return { invalid: oldInvalid }
8187
}
8288

8389
get invalid() {

0 commit comments

Comments
 (0)