@alifd/meet-react
Version:
Fusion Mobile React UI System Component
47 lines (46 loc) • 1.54 kB
TypeScript
import { ReactNode } from 'react';
import { ButtonProps } from '../button';
import { ModalProps } from '../modal';
import { LocaledComponentProps } from '../locale';
import { BaseComponentAttributes } from '../utils/types';
export interface LocaleType {
ok?: string;
cancel?: string;
}
export interface DialogButtonProps extends ButtonProps {
text?: string;
}
export type CloseMode = 'mask' | 'cancel' | 'ok' | 'close';
export type FooterAction = 'cancel' | 'ok' | DialogButtonProps;
export interface DialogProps extends ModalProps, LocaledComponentProps<LocaleType> {
visible?: boolean;
title?: any;
content?: string | ReactNode;
contentClassName?: string;
centered?: boolean;
vibrative?: boolean;
platform?: 'android' | 'ios';
type?: 'normal' | 'alert' | 'confirm' | 'success' | 'error' | 'notice' | 'warning' | 'help';
showIcon?: boolean;
closeMode?: CloseMode[];
okProps?: DialogButtonProps;
cancelProps?: DialogButtonProps;
footer?: any;
footerActions?: FooterAction[];
children?: ReactNode;
onOk?: (e: any) => Promise<any> | void;
onCancel?: (e: any) => void;
onClose?: (reason: string, e?: any) => void;
}
export interface DialogQuickInstance {
hide: (c?: ReactNode) => void;
}
export interface PopupProps extends BaseComponentAttributes {
closeIconType?: string;
visible: boolean;
bgColor?: string;
closeMode?: Array<'close' | 'mask'>;
children?: any;
width?: number;
onClose?: (reason: string, e?: any) => void;
}