selvamk-js / sharingan-rn-modal-dropdown

A simple and customizable react-native dropdown created using react-native-modal and react-native-paper.
MIT License
85 stars 28 forks source link

Disable dark mode in dropdown #40

Open Souravpakhira opened 3 years ago

Souravpakhira commented 3 years ago

Here dropdown is selecting from the system color dark or light but I want the default light mode irrespective of the system theme

selvamk-js commented 2 years ago

Use the react-native-paper theme option to overwrite the dark mode theme, that should help.

helmyandria commented 2 years ago

is there an example to implement?

selvamk-js commented 2 years ago

If you are using react-native-paper check out their docs to overwrite the theme, you have to pass the same light theme configurations to the dark theme that will overwrite the dark theme or explore this package props there is a theme prop that will overwrite the theme

ArturGr commented 2 years ago

example for forcing light mode:

  import { DefaultTheme } from 'react-native-paper';
  import { Dropdown } from 'sharingan-rn-modal-dropdown';

  <Dropdown
      paperTheme={DefaultTheme}
      // ...other props
  />