antd-mobile
Version:
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*hjjDS5Yy-ooAAAAAAAAAAAAAARQnAQ" alt="logo" width="100%" />
33 lines (32 loc) • 1 kB
TypeScript
import React, { FC, ReactNode } from 'react';
import { NativeProps } from '../../utils/native-props';
import { GetContainer } from '../../utils/render-to-container';
export declare type Action = {
key: string | number;
text: ReactNode;
disabled?: boolean;
description?: ReactNode;
danger?: boolean;
onClick?: () => void;
};
export declare type ActionSheetProps = {
visible: boolean;
actions: Action[];
extra?: React.ReactNode;
cancelText?: React.ReactNode;
onAction?: (action: Action, index: number) => void;
onClose?: () => void;
afterClose?: () => void;
onMaskClick?: () => void;
closeOnAction?: boolean;
closeOnMaskClick?: boolean;
getContainer?: GetContainer;
safeArea?: boolean;
} & NativeProps;
export declare const ActionSheet: FC<ActionSheetProps>;
export declare type ActionSheetRef = {
close: () => void;
};
export declare function showActionSheet(props: Omit<ActionSheetProps, 'visible'>): {
close: () => void;
};