Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation hint icon alignment #2160

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nine-wasps-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Fixed the alignment of the field validation hint icon.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface FieldValidationHintProps
}

const wrapperStyles = ({ theme }: StyleProps) => css`
display: block;
display: flex;
margin-top: ${theme.spacings.bit};
color: var(--cui-fg-subtle);
transition: color ${theme.transitions.default};
Expand Down Expand Up @@ -86,11 +86,14 @@ const Wrapper = styled('span')<FieldValidationHintProps>(

const iconWrapperStyles = ({ theme }: StyleProps) =>
css`
display: inline-block;
position: relative;
display: block;
align-self: flex-start;
flex-shrink: 0;
width: ${theme.iconSizes.kilo};
height: ${theme.iconSizes.kilo};
vertical-align: text-top;
margin-top: calc(
(${theme.typography.body.two.lineHeight} - ${theme.iconSizes.kilo}) / 2
);
margin-right: ${theme.spacings.bit};
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,10 @@ exports[`ImageInput Styles should render with invalid styles and an error messag
.circuit-13 {
font-size: 0.875rem;
line-height: 1.25rem;
display: block;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
margin-top: 4px;
color: var(--cui-fg-subtle);
-webkit-transition: color 120ms ease-in-out;
Expand All @@ -2002,11 +2005,18 @@ exports[`ImageInput Styles should render with invalid styles and an error messag
}

.circuit-14 {
display: inline-block;
position: relative;
display: block;
-webkit-align-self: flex-start;
-ms-flex-item-align: flex-start;
align-self: flex-start;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
width: 16px;
height: 16px;
vertical-align: text-top;
margin-top: calc(
(1.25rem - 16px) / 2
);
margin-right: 4px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,10 @@ exports[`Input Styles should render with a description when passed the validatio
.circuit-6 {
font-size: 0.875rem;
line-height: 1.25rem;
display: block;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
margin-top: 4px;
color: var(--cui-fg-subtle);
-webkit-transition: color 120ms ease-in-out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,10 @@ select:not(:active)~.circuit-7 {
.circuit-8 {
font-size: 0.875rem;
line-height: 1.25rem;
display: block;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
margin-top: 4px;
color: var(--cui-fg-subtle);
-webkit-transition: color 120ms ease-in-out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ exports[`TextArea should render with a Tooltip when passed the validationHint pr
.circuit-6 {
font-size: 0.875rem;
line-height: 1.25rem;
display: block;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
margin-top: 4px;
color: var(--cui-fg-subtle);
-webkit-transition: color 120ms ease-in-out;
Expand Down