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

Dark mode support #106

Open
sharathkbpract opened this issue Aug 13, 2022 · 1 comment
Open

Dark mode support #106

sharathkbpract opened this issue Aug 13, 2022 · 1 comment

Comments

@sharathkbpract
Copy link

How can i make the modal support dark mode ?
I need to make the background a custom black shade and text such as options and index all white.

@hatemalimam
Copy link

This repo seems dead, and no one is maintaining it.
I have created a fork where I have added some new props that can help in the dark mode area.

Basically it boils down to this example:

      searchInputStyle={styles.textInputContainer}
      alphabetsStyle={styles.alphabetsStyle}
      leftArrowIcon={
        <FontAwesome5 name={'chevron-left'} style={styles.upperIcons} />
      }
      closeArrowIcon={<FontAwesome5 name={'times'} style={styles.upperIcons} />}
      ContainerProps={{
        style: styles.pickerContainer,
      }}

Those props are new in this fork, the most important new props is ContainerProps, where you should set the style as follow:

pickerContainer: {
      flex: 1,
      backgroundColor: theme.color.background,
}

of course the background could be dark or light, depending on your theme.

For the reset of the props, you should create the appropriate styles based on your theme, color backgroundcolor etc...

In order to us this fork, you just need to add the package:

yarn add https://github.com/hatemalimam/react-native-picker-modal-view

Hope this helps.

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

No branches or pull requests

2 participants