Repository navigation
feat: added dark theme to example - #2242
Merged
Merged
Conversation
kkafar
reviewed
Jul 10, 2024
Member
There was a problem hiding this comment.
The code looks solid. I haven't played out around with the app itself yet.
My only suggestion for now, seeing the repetition in the Text / View components would be to create some wrappers such as ThemedText / ThemedView that would use value from context and adjust the style internally. Using HOC is also reasonable here. This way we could avoid much of the repetition.
This was referenced Aug 23, 2024
This was referenced Aug 30, 2024
This was referenced Sep 24, 2024
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this pull request
Oct 9, 2024
## Description This PR adds dark theme to the example app. The theme changes automatically based on the device's appearance setting and can be changed by clicking a button. ## Changes - added dark styles to screens and components - added a state and listener for basic theme management - added a dark mode button ## Screenshots / GIFs https://github.com/software-mansion/react-native-screens/assets/91994767/c156eaa7-7603-4f92-b1a2-5599e33ecc3f https://github.com/software-mansion/react-native-screens/assets/91994767/5e479905-b046-4ea4-bfc1-1667837eee60 ## Test code and steps to reproduce - Use the Example app - Toggle the theme with a button or by changing device's setting - Browse screens ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
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
This PR adds dark theme to the example app. The theme changes automatically based on the device's appearance setting and can be changed by clicking a button.
Changes
Screenshots / GIFs
Screen.Recording.2024-07-09.at.17.01.37.mov
Screen.Recording.2024-07-09.at.17.55.02.mov
Test code and steps to reproduce
Checklist