File tree 3 files changed +28
-2
lines changed
src/client/theme-default/components
3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,20 @@ export interface DocFooter {
406
406
407
407
Can be used to customize the dark mode switch label. This label is only displayed in the mobile view.
408
408
409
+ ## lightModeSwitchTitle
410
+
411
+ - Type: ` string `
412
+ - Default: ` Switch to light theme `
413
+
414
+ Can be used to customize the light mode switch title that appears on hovering.
415
+
416
+ ## darkModeSwitchTitle
417
+
418
+ - Type: ` string `
419
+ - Default: ` Switch to dark theme `
420
+
421
+ Can be used to customize the dark mode switch title that appears on hovering.
422
+
409
423
## sidebarMenuLabel
410
424
411
425
- Type: ` string `
Original file line number Diff line number Diff line change @@ -5,14 +5,16 @@ import VPSwitch from './VPSwitch.vue'
5
5
import VPIconMoon from ' ./icons/VPIconMoon.vue'
6
6
import VPIconSun from ' ./icons/VPIconSun.vue'
7
7
8
- const { isDark } = useData ()
8
+ const { isDark, theme } = useData ()
9
9
10
10
const toggleAppearance = inject (' toggle-appearance' , () => {
11
11
isDark .value = ! isDark .value
12
12
})
13
13
14
14
const switchTitle = computed (() => {
15
- return isDark .value ? ' Switch to light theme' : ' Switch to dark theme'
15
+ return isDark .value
16
+ ? theme .value .lightModeSwitchTitle || ' Switch to light theme'
17
+ : theme .value .darkModeSwitchTitle || ' Switch to dark theme'
16
18
})
17
19
</script >
18
20
Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ export namespace DefaultTheme {
96
96
*/
97
97
darkModeSwitchLabel ?: string
98
98
99
+ /**
100
+ * @default 'Switch to light theme'
101
+ */
102
+ lightModeSwitchTitle ?: string
103
+
104
+ /**
105
+ * @default 'Switch to dark theme'
106
+ */
107
+ darkModeSwitchTitle ?: string
108
+
99
109
/**
100
110
* @default 'Menu'
101
111
*/
You can’t perform that action at this time.
0 commit comments