react-shnyaga
Version:
Is a switch ui component for React
53 lines (52 loc) • 832 B
CSS
.shnyaga {
border-radius: 13px;
cursor: pointer;
display: inline-block;
transition: background 0.1s ease;
}
.shnyaga:after {
display: block;
content: '';
left: 4px;
top: 3px;
border-radius: 12px;
background: #fff;
position: relative;
transition: all 0.2s ease-in-out;
}
.shnyaga--normal {
width: 50px;
height: 26px;
}
.shnyaga--normal:after {
width: 19px;
height: 19px;
}
.shnyaga--normal.shnyaga--checked:after {
left: 27px;
}
.shnyaga--small {
width: 45px;
height: 23px;
}
.shnyaga--small:after {
width: 16px;
height: 16px;
}
.shnyaga--small.shnyaga--checked:after {
left: 25px;
}
.shnyaga--big {
width: 60px;
height: 27px;
}
.shnyaga--big:after {
width: 20px;
height: 20px;
}
.shnyaga--big.shnyaga--checked:after {
left: 36px;
}
.shnyaga--disabled {
cursor: not-allowed;
}