summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/scss/toggle.scss
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/scss/toggle.scss')
-rw-r--r--packages/merchant-backoffice-ui/src/scss/toggle.scss67
1 files changed, 67 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/scss/toggle.scss b/packages/merchant-backoffice-ui/src/scss/toggle.scss
new file mode 100644
index 000000000..6c7346eb3
--- /dev/null
+++ b/packages/merchant-backoffice-ui/src/scss/toggle.scss
@@ -0,0 +1,67 @@
+$green: #56c080;
+
+.toggle {
+ cursor: pointer;
+ display: inline-block;
+}
+
+.toggle-switch {
+ display: inline-block;
+ background: #ccc;
+ border-radius: 16px;
+ width: 58px;
+ height: 32px;
+ position: relative;
+ vertical-align: middle;
+ transition: background 0.25s;
+
+ &:before,
+ &:after {
+ content: "";
+ }
+
+ &:before {
+ display: block;
+ background: linear-gradient(to bottom, #fff 0%, #eee 100%);
+ border-radius: 50%;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
+ width: 24px;
+ height: 24px;
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ transition: left 0.25s;
+ }
+
+ .toggle:hover &:before {
+ background: linear-gradient(to bottom, #fff 0%, #fff 100%);
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
+ }
+
+ &.disabled:before {
+ background: linear-gradient(to bottom, #ccc 0%, #bbb 100%);
+ }
+
+ .toggle:hover &.disabled:before {
+ background: linear-gradient(to bottom, #ccc 0%, #bbb 100%);
+ }
+
+ .toggle-checkbox:checked+& {
+ background: $green;
+
+ &:before {
+ left: 30px;
+ }
+ }
+}
+
+.toggle-checkbox {
+ position: absolute;
+ visibility: hidden;
+}
+
+.toggle-label {
+ margin-left: 5px;
+ position: relative;
+ top: 2px;
+} \ No newline at end of file