Skip to content
Discussion options

You must be logged in to vote

Thank you for giving me a different way of approaching this issue. I was able to solve it, and it was actually pretty simple.

So in order to have theming, styled-components requires you to wrap your rendered content into a <ThemeProvider> where you can designate a theme object to this component like this: <ThemeProvider theme={theme}>. Usually you wrap this component in the App function, where the routing takes place with <RouterProvider> being present.

All you need to do is to wrap your rendered component, like most probably the LayoutDefault with <ThemeProvider>, but currently I only have a +Page.tsx to show an example. (I thought that this theming had to be done in a Vike specific way)

e…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@brillout
Comment options

Answer selected by PrivateN00b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants