useTheme hooks changes for Auto option#35
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Nice work. Do we keep |
|
We should probs cut the |
| setLightTheme(enabled: boolean) { | ||
| setTheme((prev) => { | ||
| const fallbackTheme = | ||
| prev.theme !== getLightTheme(prev.themes) |
There was a problem hiding this comment.
@neural-machine how do we know if a theme is light or dark?
There was a problem hiding this comment.
Sorry! I completely forgot about this PR.
Right now, light and dark theme has name light and dark respectively. This invariant was here before the change so it's not a breaking change.
There was a problem hiding this comment.
@neural-machine think it would be best if we were to have a new field kind or type to indicate if the type of a given theme is light or dark accordingly. I would also look into ways of defining a default light/dark themes by providing a flag and applying them when relying on the OS setting.
Junoblocks changes for Auto-theme option.