UNPKG

react-native-custom-dropdown

Version:

A single or multiple, searchable item picker (dropdown) component for react native which supports both Android & iOS.

52 lines (50 loc) 1.92 kB
declare module 'react-native-custom-dropdown' { import React, { ComponentType } from 'react'; import { StyleProp, TextStyle, ViewStyle, ScrollViewProps, TextInputProps } from 'react-native'; type DropDownPicker = { items: { label: any, value: any, icon?: () => JSX.Element, disabled?: boolean, selected?: boolean }[]; defaultValue?: any; placeholder?: string; dropDownMaxHeight?: number; style?: StyleProp<ViewStyle>; dropDownStyle?: StyleProp<ViewStyle>; containerStyle?: StyleProp<ViewStyle>; itemStyle?: StyleProp<ViewStyle>; labelStyle?: StyleProp<TextStyle>; selectedLabelStyle?: StyleProp<TextStyle>; placeholderStyle?: StyleProp<TextStyle>; activeItemStyle?: StyleProp<ViewStyle>; activeLabelStyle?: StyleProp<TextStyle>; arrowStyle?: StyleProp<ViewStyle>; arrowColor?: string; arrowSize?: number; showArrow?: boolean; customArrowUp?: (size: number, color: string) => JSX.Element; customArrowDown?: (size: number, color: string) => JSX.Element; customTickIcon?: () => JSX.Element; zIndex?: number; disabled?: boolean; isVisible?: boolean; autoScrollToDefaultValue?: boolean; multiple?: boolean; multipleText?: string; min?: number; max?: number; searchable?: boolean; searchablePlaceholder?: string; searchablePlaceholderTextColor?: string; searchableStyle?: StyleProp<TextStyle>; searchableError?: () => JSX.Element; selectedLabelLength?: number, labelLength?: number, scrollViewProps?: ScrollViewProps, searchTextInputProps?: TextInputProps, controller?: (instance: object) => void, onOpen?: () => void; onClose?: () => void; onChangeItem?: (item: any, index: number) => void; onChangeList?: (items: any, callback: () => void) => void; }; const DropDownPicker: ComponentType<DropDownPicker>; export default DropDownPicker; }