-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Hi! 👋
I noticed that DropdownProps is defined but not exported. This makes it difficult to use TypeScript properly when creating reusable components. I resolved the issue locally using patch-package.
Here is the diff:
diff --git a/node_modules/react-native-element-dropdown/src/index.tsx b/node_modules/react-native-element-dropdown/src/index.tsx
index 9b363a6..3d9fde7 100644
--- a/node_modules/react-native-element-dropdown/src/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/index.tsx
@@ -1,7 +1,7 @@
import Dropdown from './components/Dropdown';
import MultiSelect from './components/MultiSelect';
import SelectCountry from './components/SelectCountry';
-import { IDropdownRef } from './components/Dropdown/model';
+import { IDropdownRef, DropdownProps } from './components/Dropdown/model';
import { IMultiSelectRef } from './components/MultiSelect/model';
import { ISelectCountryRef } from './components/SelectCountry/model';
@@ -12,4 +12,5 @@ export {
IDropdownRef,
IMultiSelectRef,
ISelectCountryRef,
- DropdownProps,
};
This small export allows consumers to strongly type their components without accessing internal paths. It would be great to have this included in the package.
Thanks again!