zajno-react-ui-kit
Version:
ui-kit styles wrapped to ReactJS Component in React Native name-space.
55 lines (51 loc) • 1.04 kB
text/less
.uk-label {
background: none;
}
.switch {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}
.switch input {display:none;}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #cdd9e2;
-webkit-transition: .4s;
transition: .4s;
&:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
right: 21px;
bottom: 2px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
&.circle {
border-radius: 34px;
&:before {
border-radius: 50%;
}
}
}
input {
&:checked + .slider {
background-color: #4fbead;;
}
&:focus + .slider {
box-shadow: 0 0 1px #4fbead;
}
&:checked + .slider:before {
-webkit-transform: translateX(18px);
-ms-transform: translateX(18px);
transform: translateX(18px);
}
}