P粉9405389472023-08-30 13:47:02
Please check the code link below, I hope it is useful to you. We used a library from Tailwind called flowbite which provides a built-in dark mode toggle so we could apply it.
Please refer to this link: https://codesandbox.io/embed/fervent-fast-6v9fn5?autoresize=1&fontsize=14&hidenavigation=1&theme=dark
You can also refer to this document: https://flowbite.com/docs/customize/dark-mode/