Skip to content
  • Sponsor vue-a11y/vue-dark-mode

  • Notifications You must be signed in to change notification settings
  • Fork 9
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 25f4ab5

Browse files
committedMay 3, 2020
Update example
1 parent e8a444d commit 25f4ab5

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed
 

‎demo/index.html

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<meta name="theme-color" content="#fff">
78
<title>Demo - Vue DarkMode</title>
89
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
910
<script src="./vue-dark-mode.js"></script>
@@ -22,16 +23,6 @@
2223
color: #42B983;
2324
}
2425

25-
.sr-only {
26-
position: absolute;
27-
clip: rect(1px, 1px, 1px, 1px);
28-
height: 1px;
29-
width: 1px;
30-
margin: -1px;
31-
overflow: hidden;
32-
padding: 0;
33-
}
34-
3526
.header {
3627
width: 100%;
3728
padding: 16px 4%;
@@ -73,8 +64,8 @@ <h1>
7364
</h1>
7465
<div>
7566
<vue-dark-mode class="btn-darkmode">
76-
<template v-slot="{ isDark }">
77-
Dark mode: <span aria-hidden="true">{{ isDark ? 'on' : 'off' }}</span>
67+
<template v-slot="{ mode }">
68+
Color mode: <span aria-hidden="true">{{ mode }}</span>
7869
</template>
7970
</vue-dark-mode>
8071
</div>
@@ -98,6 +89,7 @@ <h1>
9889
new Vue({
9990
el: '#app'
10091
})
92+
Vue.config.devtools = true
10193
</script>
10294
</body>
10395
</html>

0 commit comments

Comments
 (0)
Please sign in to comment.