File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11<template >
2- <section class =" wrapper" :title =" title" >
2+ <section class =" wrapper" v-bind:class = " {dark: darkTheme} " :title =" title" >
33 <input :id =" id" :name =" name" v-model =" toggled" class =" toggle" type =" checkbox" @click =" toggled = !toggled" />
44 <label :for =" id" class =" toggler" />
55 <span class =" title" v-text =" title" @click =" toggled = !toggled" />
@@ -15,6 +15,7 @@ export default {
1515 name: {type: [String , Boolean ], default: false },
1616 title: {type: String , required: true },
1717 toggled: {type: Boolean , default: false },
18+ darkTheme: {type: Boolean , default: false }
1819 },
1920}
2021 </script >
@@ -41,6 +42,10 @@ export default {
4142 & ::selection {
4243 background : none ;
4344 }
45+
46+ .dark & {
47+ color : white ;
48+ }
4449}
4550
4651.toggle {
@@ -80,6 +85,10 @@ export default {
8085 width : 50% ;
8186 will-change : left ;
8287 }
88+
89+ .dark & {
90+ background : #374151 ;
91+ }
8392 }
8493
8594 & :checked {
You can’t perform that action at this time.
0 commit comments