Merge pull request #5966 from vruello/patch-1
doc: Fix toggleColorScheme function in themingpull/5969/head
commit
3e2c905bed
|
@ -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');
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue