UNPKG

@vidit-me/react-native-wheely

Version:

An all JavaScript, highly customizable wheel picker for react-native.

28 lines (27 loc) 988 B
import React from 'react'; import { StyleProp, TextStyle, ViewStyle, ViewProps, FlatListProps } from 'react-native'; export interface WheelPickerRef { scrollToIndex: (params: { index: number; animated?: boolean; }) => void; } interface Props { selectedIndex: number; options: string[]; onChange: (index: number) => void; selectedIndicatorStyle?: StyleProp<ViewStyle>; itemTextStyle?: TextStyle; itemStyle?: ViewStyle; itemHeight?: number; containerStyle?: ViewStyle; containerProps?: Omit<ViewProps, 'style'>; scaleFunction?: (x: number) => number; rotationFunction?: (x: number) => number; opacityFunction?: (x: number) => number; visibleRest?: number; decelerationRate?: 'normal' | 'fast' | number; flatListProps?: Omit<FlatListProps<string>, 'data' | 'renderItem'>; } declare const WheelPicker: React.ForwardRefExoticComponent<Props & React.RefAttributes<WheelPickerRef>>; export default WheelPicker;