Open
Conversation
Paul2803k
commented
Feb 12, 2026
| import type { ThemeModeContextValue } from "./ThemeModeProvider"; | ||
|
|
||
| /** Context and hook for managing theme mode (auto/light/dark) and system preference. */ | ||
| export const ThemeModeCtx = createContext<ThemeModeContextValue | undefined>( |
Collaborator
Author
There was a problem hiding this comment.
📝to the reviewer: these functions are exported here instead that in the ThemeModeProvider because Vite does not like exporting mixed elements (such as functions and components) in the same file. We do this in other parts of the project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In this PR, we create a first draft of the dark theme, together with the support system to switch themes.
Implementation
There are two main components for the implementation:
ThemeModeProvider: is the component responsible for managing which "mode" has been selected. Currently we haveauto,darkandlightmode and we selectautoby default. Theautomode picks up the browser theme and matches it with the other 2 modes. For now the theme is saved in the browser local storage.ThemedAppis the consumer that gets the resolved theme and injects it in thestyled-componetsThemProvider.Finally we modified some components to make use of the theme colors.