How do i use the darkmodeswitcher component from the template in my other pages?
How do i implement the element specifically to let it work
6 Replies
Hi @Sven. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information on how to use the
DarkModeSwitcher
component from the template in other pages.
However, you might find it helpful to refer to the Wasp documentation (https://wasp-lang.dev/docs) or the Tailwind CSS documentation (https://tailwindcss.com/docs/dark-mode) for more information on how to work with dark mode and components.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@Vinny (@Wasp) one for you for tomorrow
you can import it into the navbar or whichever page you want it in
just like you would any other component
you'll find it in
app/src/client/components/DarkModeSwitcher.tsx
Yes i did, but it did not turn the whole page dark, just some elements
that's because you probably didn't add the tailwind
dark:
style to the className @Sven
you need to define how you'd like the elements to look liek when dark mode is activated
if you look within the template (search "dark:") you'll find examples of how it worksAaahhhh
Yeah i get it, thanks alot