UNPKG

quick-picker

Version:
47 lines (46 loc) 1.53 kB
/// <reference types="react" /> import QuickPicker from './QuickPicker'; import { TextStyle, StyleProp, ViewStyle } from 'react-native'; export interface PickerStore { isOpen: boolean; pickerComponent: QuickPicker | null; open: (pickerOptions: PickerOptions) => void; close: any; pickerOptions: PickerOptions; } export interface Item { value: string | number; label: string; } export interface PickerOptions { onTapOut?: () => void; items?: Item[]; item?: Item | null; onChange?: (item: Item | Date) => void; doneButtonTextStyle?: TextStyle; onPressDone?: (item: Item | Date) => void; doneButtonText?: string; disableTopRow?: boolean; topRow?: React.ReactNode; pickerType?: 'normal' | 'time'; pickerStyleType?: any; itemStyle?: StyleProp<TextStyle>; date?: Date; mode?: 'date' | 'time' | 'datetime' | 'countdown'; display?: 'default' | 'spinner' | 'calendar' | 'clock'; maximumDate?: Date; minimumDate?: Date; timeZoneOffsetInMinutes?: number; locale?: string; is24Hour?: boolean; minuteInterval?: 1 | 2 | 6 | 5 | 4 | 3 | 10 | 12 | 15 | 20 | 30; cancelButtonText?: string; androidModalStyle?: StyleProp<ViewStyle>; androidItemStyle?: StyleProp<ViewStyle>; androidItemTextStyle?: StyleProp<TextStyle>; androidSelectedItemStyle?: StyleProp<ViewStyle>; useNativeDriver?: boolean; } declare const pickerStore: PickerStore; export default pickerStore; export declare const ANIMATION_DURATION = 250;