@storybook/addon-ondevice-controls
Version:
Display storybook controls on your device.
66 lines (65 loc) • 3.74 kB
TypeScript
import { ReactNode } from 'react';
import { ViewStyle, TextStyle, StyleProp } from 'react-native';
type SupportedOrientation = 'portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right';
interface SelectModalProps {
data: any[];
onChange?: (item: any | any[]) => void;
onModalOpen?: () => void;
onModalClose?: () => void;
keyExtractor?: (item: any) => string;
labelExtractor?: (item: any) => string;
visible?: boolean;
closeOnChange?: boolean;
initValue?: string | string[];
listType?: 'SCROLLVIEW' | 'FLATLIST';
animationType?: 'none' | 'slide' | 'fade';
style?: StyleProp<ViewStyle>;
selectStyle?: StyleProp<ViewStyle>;
selectTextStyle?: StyleProp<TextStyle>;
optionStyle?: StyleProp<ViewStyle>;
optionTextStyle?: StyleProp<TextStyle>;
optionContainerStyle?: StyleProp<ViewStyle>;
sectionStyle?: StyleProp<ViewStyle>;
childrenContainerStyle?: StyleProp<ViewStyle>;
touchableStyle?: StyleProp<ViewStyle>;
touchableActiveOpacity?: number;
sectionTextStyle?: StyleProp<TextStyle>;
selectedItemTextStyle?: StyleProp<TextStyle>;
cancelContainerStyle?: StyleProp<ViewStyle>;
cancelStyle?: StyleProp<ViewStyle>;
cancelTextStyle?: StyleProp<TextStyle>;
overlayStyle?: StyleProp<ViewStyle>;
initValueTextStyle?: StyleProp<TextStyle>;
cancelText?: string;
disabled?: boolean;
supportedOrientations?: SupportedOrientation[];
keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
backdropPressToClose?: boolean;
openButtonContainerAccessible?: boolean;
listItemAccessible?: boolean;
cancelButtonAccessible?: boolean;
scrollViewAccessible?: boolean;
scrollViewAccessibilityLabel?: string;
cancelButtonAccessibilityLabel?: string;
passThruProps?: any;
selectTextPassThruProps?: any;
optionTextPassThruProps?: any;
cancelTextPassThruProps?: any;
scrollViewPassThruProps?: any;
modalOpenerHitSlop?: any;
customSelector?: ReactNode;
selectedKey?: any;
children?: ReactNode;
header?: ReactNode;
optionsTestIDPrefix?: string;
onEndReached?: () => void;
multiselect?: boolean;
selectedSeparator?: string;
maxSelectedItems?: number;
selectedItemIndicatorStyle?: StyleProp<ViewStyle>;
selectedItemIndicatorColor?: string;
doneText?: string;
onDone?: (selectedItems: any[]) => void;
}
export declare const SelectModal: ({ data, onChange, onModalOpen, onModalClose, keyExtractor, labelExtractor, closeOnChange, initValue, listType, animationType, style, selectStyle: selectStyleProp, selectTextStyle: selectTextStyleProp, optionStyle: optionStyleProp, optionTextStyle: optionTextStyleProp, optionContainerStyle, sectionStyle: sectionStyleProp, childrenContainerStyle, touchableStyle, touchableActiveOpacity, sectionTextStyle: sectionTextStyleProp, cancelContainerStyle, cancelStyle: cancelStyleProp, cancelTextStyle: cancelTextStyleProp, overlayStyle: overlayStyleProp, initValueTextStyle: initValueTextStyleProp, cancelText, disabled, supportedOrientations, keyboardShouldPersistTaps, backdropPressToClose, openButtonContainerAccessible, listItemAccessible, cancelButtonAccessible, scrollViewAccessible, scrollViewAccessibilityLabel, cancelButtonAccessibilityLabel, passThruProps, selectTextPassThruProps, optionTextPassThruProps, cancelTextPassThruProps, scrollViewPassThruProps, modalOpenerHitSlop, customSelector, children, header, optionsTestIDPrefix, onEndReached, multiselect, selectedSeparator, maxSelectedItems, selectedItemIndicatorStyle, selectedItemIndicatorColor, doneText, onDone, }: SelectModalProps) => import("react/jsx-runtime").JSX.Element;
export default SelectModal;