-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New color mode system for the beta documentation #3976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@rachelnabors would love to hear your thoughts on this |
Instead of developing a custom solution, I would suggest using https://github.com/pacocoursey/next-themes |
i don't think that is a good idea since the new website uses tailwindcss |
|
@rachelnabors I think i could do this with the context API if you would prefer this being done without an external dependency |
actually i am gonna remove this dependency just in case |
6828886
to
b0b186c
Compare
@rachelnabors @gaearon could you please have a look at this? |
Sorry, this got auto-closed when I reshuffled the branches. Please feel free to resubmit the changes against the We've already started the relevant work in #4019 about a week ago (unfortunately I've just found time to move the code). How does your PR compare to that? Do you have a list of things that it does so that we can compare them one by one? Thanks! |
in my pr i also have the color mode persist and also added smooth transitions in between the color mode changes |
Below mentioned things are added in this pr:
this was achieved by creating a context provider using the context api called
ThemeProvider
it can be found atsrc/modules/ThemeProvider.tsx
below is a short preview that showcases things added in this pr
https://i.imgur.com/oXRQvzU.mp4