Skip to content

Commit 56fd262

Browse files
authored
fix(components): Position validation hint relative to checkbox (#457)
1 parent 4592ad6 commit 56fd262

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/components/Checkbox/Checkbox.js

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ const inputStyles = ({ theme }) => css`
116116

117117
const checkboxWrapperBaseStyles = ({ theme }) => css`
118118
label: checkbox;
119+
position: relative;
120+
119121
&:last-of-type {
120122
margin-bottom: ${theme.spacings.mega};
121123
}

src/components/Checkbox/__snapshots__/Checkbox.spec.js.snap

+20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Checkbox should render with a tooltip when passed a validation hint 1`] = `
4+
.circuit-6 {
5+
position: relative;
6+
}
7+
48
.circuit-6:last-of-type {
59
margin-bottom: 16px;
610
}
@@ -158,6 +162,10 @@ exports[`Checkbox should render with a tooltip when passed a validation hint 1`]
158162
`;
159163

160164
exports[`Checkbox should render with checked styles when passed the checked prop 1`] = `
165+
.circuit-4 {
166+
position: relative;
167+
}
168+
161169
.circuit-4:last-of-type {
162170
margin-bottom: 16px;
163171
}
@@ -269,6 +277,10 @@ exports[`Checkbox should render with checked styles when passed the checked prop
269277
`;
270278

271279
exports[`Checkbox should render with default styles 1`] = `
280+
.circuit-4 {
281+
position: relative;
282+
}
283+
272284
.circuit-4:last-of-type {
273285
margin-bottom: 16px;
274286
}
@@ -380,6 +392,10 @@ exports[`Checkbox should render with default styles 1`] = `
380392
`;
381393

382394
exports[`Checkbox should render with disabled styles when passed the disabled prop 1`] = `
395+
.circuit-4 {
396+
position: relative;
397+
}
398+
383399
.circuit-4:last-of-type {
384400
margin-bottom: 16px;
385401
}
@@ -509,6 +525,10 @@ exports[`Checkbox should render with disabled styles when passed the disabled pr
509525
`;
510526

511527
exports[`Checkbox should render with invalid styles when passed the invalid prop 1`] = `
528+
.circuit-4 {
529+
position: relative;
530+
}
531+
512532
.circuit-4:last-of-type {
513533
margin-bottom: 16px;
514534
}

0 commit comments

Comments
 (0)