UNPKG

1.16 kBTypeScriptView Raw
1import * as React from 'react';
2import { BadgeProps } from '../badge';
3export interface ActionSheetOptions {
4 maskClosable?: boolean;
5 cancelButtonIndex?: number;
6 destructiveButtonIndex?: number;
7 title?: React.ReactNode;
8 message?: React.ReactNode;
9 className?: string;
10 transitionName?: string;
11 maskTransitionName?: string;
12}
13export interface ShareOption {
14 icon: React.ReactNode;
15 title: string;
16}
17export interface ShareActionSheetWithOptions extends ActionSheetOptions {
18 options: ShareOption[] | ShareOption[][];
19 badges?: BadgesOption[];
20}
21export interface BadgesOption extends BadgeProps {
22 index: number;
23}
24export interface ActionSheetWithOptions extends ActionSheetOptions {
25 options: string[];
26 badges?: BadgesOption[];
27}
28export declare type ActionCallBack = (index: number, rowIndex?: number) => PromiseLike<any> | void;
29declare const _default: {
30 showActionSheetWithOptions(config: ActionSheetWithOptions, callback?: ActionCallBack): void;
31 showShareActionSheetWithOptions(config: ShareActionSheetWithOptions, callback?: ActionCallBack): void;
32 close(): void;
33};
34export default _default;