react-native-wheely-picker
Version:
An all JavaScript, highly customizable wheel picker for react-native.
22 lines (21 loc) • 831 B
TypeScript
import React from 'react';
import { StyleProp, ViewStyle, ViewProps, FlatListProps } from 'react-native';
interface Props {
selectedIndex: number;
options: any[];
onChange: (index: number) => void;
renderItem: (option: any, index: number) => React.ReactElement | null;
selectedIndicatorStyle?: StyleProp<ViewStyle>;
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 | null>, 'data' | 'renderItem'>;
}
declare const WheelPicker: React.FC<Props>;
export default WheelPicker;