UNPKG

@uiw/react-native

Version:
41 lines (40 loc) 1.41 kB
import React from 'react'; import { TextStyle, StyleProp, ViewStyle } from 'react-native'; import { ModalProps } from '../Modal'; export { default as ActionSheetItem } from './item'; export interface DividerStyle { itemDivider?: StyleProp<ViewStyle>; actionDivider?: StyleProp<ViewStyle>; } export interface ActionSheetProps extends ModalProps { /** 点击蒙层是否关闭 */ onCancel?: Boolean; /** 分割线样式 */ dividerStyle?: DividerStyle; /** 取消的容器样式 */ containerStyle?: StyleProp<ViewStyle>; /** 取消的文本样式 */ textStyle?: StyleProp<TextStyle>; /** 动作在被触摸操作激活时以多少不透明度显示 默认 1 */ activeOpacity?: number; /** 动作有触摸操作时显示出来的底层的颜色 */ underlayColor?: string; /** 取消的文本 */ cancelText?: React.ReactNode; } interface ActionSheetState { stateVisible: boolean; control: 'props' | 'state'; } export default class ActionSheet extends React.Component<ActionSheetProps, ActionSheetState> { constructor(props: ActionSheetProps); static getDerivedStateFromProps(props: ActionSheetProps, state: ActionSheetState): { control: string; stateVisible?: undefined; } | { control: string; stateVisible: boolean | undefined; } | null; onClose: () => void; render(): JSX.Element; }