Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Paper theme by default #49

Closed
WillSmithTE opened this issue Nov 16, 2023 · 4 comments · Fixed by #56
Closed

Use Paper theme by default #49

WillSmithTE opened this issue Nov 16, 2023 · 4 comments · Fixed by #56

Comments

@WillSmithTE
Copy link

WillSmithTE commented Nov 16, 2023

I thought this package would use PaperProvider theme by default, and while technically it does, it also overrides styles meaning the theme is ignored.

E.g. I useMD3DarkTheme for dark mode, but the styling for the TextInput is overridden because it uses its own styles.

textInput: {
    backgroundColor: '#fff',
    color: '#000',
  },

here

Is this intentional? Would you accept a PR to change it?

Same for the dialog background color

@WillSmithTE
Copy link
Author

Similarly, if we could import Text from react-native-paper here we'd keep the theme

@GunnarAK
Copy link

This is also the case for the dialog portion. The backgroundColor is set to white and is not inheriting the app theme.

https://github.com/srivastavaanurag79/react-native-paper-select/blob/master/src/module/paperSelect.tsx#L375

const styles = StyleSheet.create({
  container: {
    width: '100%',
    marginBottom: 10,
  },
  dialog: {
    backgroundColor: 'white',      <-----
    borderRadius: 5,
  },
  ...

Temp fix is setting the dialogStyle={{backgroundColor: colorScheme === "dark" ? "YOUR_DARK_COLOR" : "YOUR_LIGHT_COLOR"}} prop on your <PaperSelect /> component.

@srivastavaanurag79
Copy link
Owner

will fix it in next update

@srivastavaanurag79
Copy link
Owner

@himrocks33 Please fix this in your merge request also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants