Skip to content

Commit

Permalink
Remove duplicate id from the validation hint icon in form components (#…
Browse files Browse the repository at this point in the history
…1993)

* Don't forward props to validation hint icon

* Add changeset
  • Loading branch information
connor-baer authored Mar 14, 2023
1 parent 36d44de commit 167ec18
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-ghosts-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Remove duplicate id from the validation hint icon in form components.
Original file line number Diff line number Diff line change
Expand Up @@ -629,11 +629,6 @@ exports[`Checkbox Styles should render with invalid styles and an error message
height: 16px;
vertical-align: text-top;
margin-right: 4px;
color: var(--cui-fg-danger);
}
.cui-field-disabled .circuit-4 {
color: var(--cui-fg-danger-disabled);
}
<div>
Expand Down Expand Up @@ -676,7 +671,6 @@ exports[`Checkbox Styles should render with invalid styles and an error message
>
<div
class="circuit-4"
id="validation_hint-8"
>
<svg
fill="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,21 @@ const getIcon = (props: FieldValidationHintProps) => {
}
case props.invalid: {
return (
<IconWrapper {...props}>
<IconWrapper>
<Alert role="presentation" size="16" />
</IconWrapper>
);
}
case props.hasWarning: {
return (
<IconWrapper {...props}>
<IconWrapper>
<Notify role="presentation" size="16" />
</IconWrapper>
);
}
case props.showValid: {
return (
<IconWrapper {...props}>
<IconWrapper>
<Confirm role="presentation" size="16" />
</IconWrapper>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2001,11 +2001,6 @@ exports[`ImageInput Styles should render with invalid styles and an error messag
height: 16px;
vertical-align: text-top;
margin-right: 4px;
color: var(--cui-fg-danger);
}
.cui-field-disabled .circuit-14 {
color: var(--cui-fg-danger-disabled);
}
<div>
Expand Down Expand Up @@ -2107,7 +2102,6 @@ exports[`ImageInput Styles should render with invalid styles and an error messag
>
<div
class="circuit-14"
id="validation-hint_6"
>
<svg
fill="none"
Expand Down

1 comment on commit 167ec18

@vercel
Copy link

@vercel vercel bot commented on 167ec18 Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.