Skip to content

Commit 9a6853d

Browse files
author
Ian Wensink
committed
feat(styled-components): fix little jump on validation icon appearance
1 parent ace4cae commit 9a6853d

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/BaseInput/styled/validation-icon.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ export default styled.span`
66
height: calc(${p => p.theme.spacingUnit} / 1.5);
77
margin-left: calc(${p => p.theme.spacingUnit} / 1.5);
88
9+
&::after {
10+
content: '';
11+
display: block;
12+
width: 60%;
13+
height: 100%;
14+
border-bottom: 2px solid ${p => p.theme.successColor};
15+
border-right: 2px solid ${p => p.theme.successColor};
16+
transform: rotate(45deg) translateY(-4px);
17+
transform: rotate(45deg) translateY(-4px);
18+
opacity: 0;
19+
}
20+
921
${p => p.success && `
1022
&::after {
11-
content: '';
12-
display: block;
13-
width: 60%;
14-
height: 100%;
15-
border-bottom: 2px solid ${p.theme.successColor};
16-
border-right: 2px solid ${p.theme.successColor};
17-
transform: rotate(45deg) translateY(-4px);
23+
opacity: 1;
1824
}
1925
`}
2026
`;

0 commit comments

Comments
 (0)