Open RilDev opened 1 year ago
Yep. I have the exact same issue.
From looking at the types, it looks like addTheme
takes two args:
and
ThemeNameType = 'DEFAULT' | 'LIGHT' | 'DARK';
So there's really no way to set your custom theme.
Hi ran into the same issue.
The trouble is that whem you import
your theme you only get the default. But the package need to get the theme as an object with the ICONS and the default (containing your styling).
You need to change the way you import your theme in your App.jsx
like so:
const myTheme = require("./myTheme");
This is specified in the doc.
Hi there, I would like to customize the dropdown's theme.
I followed the documentation here, but it throws an error.
Here is a minimal reproduction: https://github.com/RilDev/react-native-dropdown-picker-custom-theming
Do you know how to fix it?
Reproduction Steps
yarn create expo
react-native-dropdown-picker
withyarn add react-native-dropdown-picker
The theme is defined in
myTheme.js
.The dropdown picker is displayed in
App.jsx
.Expected Behavior
Display the dropdown picker with the custom theme.
Actual Behavior
The dropdown throws an error:
Thank you for your help!