Button styles wrongly persist after toggling from light to dark, or dark to light
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react-native
- Domain
- mobile
Research direction
Reproduce the issue by defining button styles under the RneTheme's theme.components, then toggle between light and dark modes. Compare the button background and text colors with the expected theme values in each mode; done means styles update in both directions without retaining the initially loaded values.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Explain what you did
Theming buttons with the theme provider and toggling the dark/light mode.
Expected behavior
The colors should be changed to those defined under theme.components
Describe the bug
Same bug as #3655, but for buttons
Steps To Reproduce
Add a button with styles defined in the RneTheme, then toggle dark/light mode and note that the styles do not update
Screenshots
Toggling from light mode to dark mode, or reverse, persists the originally loaded styles for background and text colors
Correct button light mode

Incorrect button dark mode (after loading app in light mode and switching to dark)

Correct button dark mode

Incorrect button light mode (after loading app in dark mode and switching to light)

Your Environment
Your Environment
`npx @rneui/envinfo`
```
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (4) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 2.08 GB / 19.51 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
Managers:
Apt: 2.4.7 - /usr/bin/apt
pip3: 22.2.2 - ~/.local/bin/pip3
Utilities:
CMake: 3.22.1 - /usr/bin/cmake
Make: 4.3 - /usr/bin/make
GCC: 11.2.0 - /usr/bin/gcc
Git: 2.38.1 - /usr/bin/git
SDKs:
Android SDK:
API Levels: 31, 32, 33
Build Tools: 30.0.3, 31.0.0, 33.0.0
System Images: android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
IDEs:
Nano: 6.2 - /usr/bin/nano
VSCode: 1.68.1 - /usr/bin/code
Languages:
Bash: 5.1.16 - /usr/bin/bash
Perl: 5.34.0 - /usr/bin/perl
Python3: 3.10.6 - /usr/bin/python3
Databases:
SQLite: 3.32.2 - /home/me/Android/Sdk/platform-tools/sqlite3
Browsers:
Chrome: 106.0.5249.61
Firefox: 106.0
Monorepos:
Yarn Workspaces: 1.22.19
Lerna: 5.6.2
```
- Dominant language
- MDX
- Stars
- 25.9k
- Forks
- 4.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-native-elements/react-native-elements
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
react-native-elements/react-native-elements#4035 · 1 comment ·
-
Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
react-native-elements/react-native-elements#3963 · 2 comments · 2 reactions ·
-
component: Button
react-native-elements/react-native-elements#4032 · 1 assignee ·
-
TS Bug - @rneui/base@5.0.0 — Undeclared type dependency causes IconProps to lose color/name/size Opencomponent: Icon
react-native-elements/react-native-elements#4027 · 2 comments · 4 reactions · 1 assignee ·
-
📞 Needs Response from Author
react-native-elements/react-native-elements#4022 · 9 comments · 2 reactions · 1 assignee ·
All issues in react-native-elements/react-native-elements
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
Icon Requests Opensupported
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LawnchairLauncher/lawnicons#4100 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Kapsyloffer/ROPE#32 ·
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100