diff --git a/playground/src/pages/misc/DarkModeDemo.vue b/playground/src/pages/misc/DarkModeDemo.vue new file mode 100644 index 0000000..16b6651 --- /dev/null +++ b/playground/src/pages/misc/DarkModeDemo.vue @@ -0,0 +1,37 @@ + + + diff --git a/playground/src/router/routes/misc.ts b/playground/src/router/routes/misc.ts index 9274277..4dc1c8a 100644 --- a/playground/src/router/routes/misc.ts +++ b/playground/src/router/routes/misc.ts @@ -4,4 +4,9 @@ export const miscRoutes = [ name: 'FPSgraph', component: () => import('../../pages/misc/FPSgraphDemo.vue'), }, + { + path: '/misc/dark-mode', + name: 'DarkMode', + component: () => import('../../pages/misc/DarkModeDemo.vue'), + }, ] diff --git a/src/components/FPSGraph.vue b/src/components/FPSGraph.vue index b889c8f..62d1c2e 100644 --- a/src/components/FPSGraph.vue +++ b/src/components/FPSGraph.vue @@ -67,7 +67,9 @@ useRafFn(({ timestamp }) => { } }) -const isDark = useDark() +const isDark = useDark({ + attribute: 'class', +})