mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(color-mode): fix computed setter logic in ColorModeButton.vue example (#3903)
This commit is contained in:
@@ -26,8 +26,8 @@ const isDark = computed({
|
||||
get() {
|
||||
return colorMode.value === 'dark'
|
||||
},
|
||||
set() {
|
||||
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
|
||||
set(_isDark) {
|
||||
colorMode.preference = _isDark ? 'dark' : 'light'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -10,8 +10,8 @@ const isDark = computed({
|
||||
get() {
|
||||
return colorMode.value === 'dark'
|
||||
},
|
||||
set() {
|
||||
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
|
||||
set(_isDark) {
|
||||
colorMode.preference = _isDark ? 'dark' : 'light'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user