From 2c1e8409e9138fe968f93f2de53d2c227845997f Mon Sep 17 00:00:00 2001 From: Vincent Ruello <5345986+vruello@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:18:32 +0200 Subject: [PATCH] Fix toggleColorScheme function in doc --- apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue b/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue index ccd33988b..e12a46c6a 100644 --- a/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue +++ b/apps/showcase/doc/theming/styled/DarkModeToggleDoc.vue @@ -44,7 +44,8 @@ app.use(PrimeVue, { code3: { basic: ` const toggleColorScheme() { - document.body.classList.toggle("my-app-dark"); + const element = document.querySelector('html'); + element.classList.toggle('my-app-dark'); } ` }