79153363

Date: 2024-11-03 18:25:10
Score: 0.5
Natty:
Report link

To change the theme for the app, you need to add/remove the .my-app-dark class to the HTML tag of the page. To do this, we have to create a button and on click toggle the class .my-app-dark by running following code - document.documentElement.classList.toggle('my-app-dark')

Reference - https://primevue.org/theming/styled/#darkmode

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Amit