react-native-ui-lib
Version:
<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a
76 lines (75 loc) • 2.15 kB
TypeScript
import React from 'react';
import { TextStyle, ViewStyle } from 'react-native';
import { ItemProps } from './Item';
import { TextProps } from '../../components/text';
import { WheelPickerAlign } from './types';
export interface WheelPickerProps {
/**
* Initial value
*/
initialValue?: ItemProps | number | string;
/**
* Data source for WheelPicker
*/
items?: ItemProps[];
/**
* Describe the height of each item in the WheelPicker
* default value: 44
*/
itemHeight?: number;
/**
* Describe the number of rows visible
* default value: 5
*/
numberOfVisibleRows?: number;
/**
* Text color for the focused row
*/
activeTextColor?: string;
/**
* Text color for other, non-focused rows
*/
inactiveTextColor?: string;
/**
* Row text style
*/
textStyle?: Omit<TextStyle, 'color'>;
/**
* Additional label on the right of the item text
*/
label?: string;
/**
* The Additional label's style
*/
labelStyle?: TextStyle;
/**
* The Additional label's props
*/
labelProps?: TextProps;
/**
* Event, on active row change
*/
onChange?: (item: string | number, index: number) => void;
/**
* Container's ViewStyle, height is computed according to itemHeight * numberOfVisibleRows
*/
style?: Omit<ViewStyle, 'height'>;
/**
* Support passing items as children props
*/
children?: JSX.Element | JSX.Element[];
/**
* Align the content to center, right ot left (default: center)
*/
align?: WheelPickerAlign;
testID?: string;
}
declare const _default: React.ComponentClass<WheelPickerProps & {
useCustomTheme?: boolean | undefined;
}, any> & {
({ items: propItems, itemHeight, numberOfVisibleRows, activeTextColor, inactiveTextColor, textStyle, label, labelStyle, labelProps, onChange, align, style, children, initialValue, testID }: WheelPickerProps): JSX.Element;
alignments: typeof WheelPickerAlign;
displayName: string;
};
export default _default;
export { ItemProps as WheelPickerItemProps };