Add a css class to the checkbox indicator

environments/review-dokku-dkhv2e/deployments/124
taehoon 6 years ago
parent cf72ebb407
commit 91502a25a4

@ -36,7 +36,7 @@ export default {
return (
<label class="checkbox" {...wrapperProps}>
<input type="checkbox" {...inputProps} />
<i />
<i class="checkbox-indicator" />
{children && <span>{children}</span>}
</label>
)

@ -5,10 +5,7 @@
display: inline-block;
padding-left: 1.2em;
input[type=checkbox] {
display: none;
& + i::before {
&-indicator::before {
position: absolute;
left: 0;
top: 0;
@ -32,12 +29,15 @@
box-sizing: border-box;
}
&:checked + i::before {
input[type=checkbox] {
display: none;
&:checked + .checkbox-indicator::before {
color: $fallback--text;
color: var(--text, $fallback--text);
}
&:disabled + i::before {
&:disabled + .checkbox-indicator::before {
opacity: .5;
}
}

Loading…
Cancel
Save