react-native-paper
react-native-paper copied to clipboard
Correct usage of `dark` property in theme
I am having trouble understanding the correct way to implement a dark theme based on the docs.
The issue is that there seems to be a conflict between using the dark property and using a DarkTheme object or I simply don't understand how it is meant to work.
My understanding is that the dark property is swapping the surface and primary colors and altering opacity in some components. The confusing part is that if you set dark: true in a DarkTheme object, you are actually setting it to a light theme.
- Is the
darkproperty only intended to be used as a quick and lazy way to convert a light theme to a dark one? - Should
dark: trueever be used if you are creating a custom light and dark theme?
This isn't a bug. It's just a question or possibly a suggestion to improve the documentation. It doesn't really make sense to include a "minimal repro", but I think this issue is getting ignored since it has a needs repro label.
So, here's a completely useless expo snack containing absolutely nothing relevant: https://snack.expo.dev/20dQJ05RQ
Couldn't find version numbers for the following packages in the issue:
react-nativereact-native-paperreact-native-vector-icons
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.
Couldn't find version numbers for the following packages in the issue:
react-nativereact-native-paperreact-native-vector-iconsexpo
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
Hello bot. Please remove the stale label. 😀
Hello @traviswimer, I guess the role of dark property was a quick way to define whether component's background color is dark-ish, so then the color of the text or icon will be switched to the contrasting color, regardless of what the theme is.
Please check the following snack, where I tried to illustrate it: https://snack.expo.dev/qhgwZULoP