Skip to content

Commit 11d163b

Browse files
Ismail NGUYENIsmail NGUYEN
Ismail NGUYEN
authored and
Ismail NGUYEN
committed
Add initial state to switch value
1 parent 4d1d00d commit 11d163b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/components/DarkModeSwitch.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919

2020
<script>
2121
export default {
22+
props: ['initialState'],
2223
data () {
2324
return {
24-
isEnabled: false
25+
isEnabled: initialState || false
2526
}
2627
},
2728
watch: {

0 commit comments

Comments
 (0)