summaryrefslogtreecommitdiff
path: root/src/components/ToggleSwitch.module.scss
diff options
context:
space:
mode:
authorHaishan <[email protected]>2018-10-20 20:32:02 +0800
committerHaishan <[email protected]>2018-10-20 20:32:02 +0800
commit133b29c9dac2209a3c88c3289f84ff709d404392 (patch)
treee023785cc82db732c64328a5d99938992eceecfd /src/components/ToggleSwitch.module.scss
first commit
Diffstat (limited to 'src/components/ToggleSwitch.module.scss')
-rw-r--r--src/components/ToggleSwitch.module.scss34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/components/ToggleSwitch.module.scss b/src/components/ToggleSwitch.module.scss
new file mode 100644
index 0000000..3e4bde4
--- /dev/null
+++ b/src/components/ToggleSwitch.module.scss
@@ -0,0 +1,34 @@
+.ToggleSwitch {
+ user-select: none;
+ border: 1px solid #525252;
+ color: #eee;
+ background: #353535;
+ display: flex;
+ position: relative;
+
+ input {
+ position: absolute;
+ left: 0;
+ opacity: 0;
+ }
+
+ label {
+ flex: 1;
+ z-index: 2;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 10px;
+ cursor: pointer;
+ }
+}
+
+.slider {
+ z-index: 1;
+ position: absolute;
+ display: block;
+ left: 0;
+ height: 100%;
+ transition: left 0.2s ease-out;
+ background: #181818;
+}