Fix toggleColorScheme function in doc

pull/5966/head
Vincent Ruello 2024-06-25 18:18:32 +02:00 committed by GitHub
parent 3c13918e2b
commit 2c1e8409e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@ app.use(PrimeVue, {
code3: { code3: {
basic: ` basic: `
const toggleColorScheme() { const toggleColorScheme() {
document.body.classList.toggle("my-app-dark"); const element = document.querySelector('html');
element.classList.toggle('my-app-dark');
} }
` `
} }