-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Current behaviour
On Android, when switching the provided theme between dark and light modes, the button's background color does not update.
Expected behaviour
The button's background color should update accordingly when the theme is switched between dark and light modes.
How to reproduce?
- Wrap your app with PaperProvider and provide a theme.
- Use React state to toggle between dark and light themes.
https://snack.expo.dev/@tonihm96/react-native-paper-button-background-color
Preview
screen-recording.mp4
What have you tried so far?
I created a wrapper Button component based on the one provided by the library and passed the desired background color via the contentStyle prop.
Your Environment
| software | version |
|---|---|
| ios | unknown |
| android | 14 |
| react-native | 0.76.3 |
| react-native-paper | 5.12.5 |
| node | 20.12.1 |
| npm | 10.8.2 |
| expo sdk | 52.0.14 |
manswiss and MoodyMusicMan