UNPKG

react-admin-component

Version:
32 lines (31 loc) 979 B
import React from 'react'; declare type AlertProps = { cancelText?: string; confirmText?: string; btnText?: string; alertType: 'success' | 'error' | 'warn' | 'confirm'; title: React.ReactNode; text?: React.ReactNode; hideIcon?: boolean; className?: string; style?: React.CSSProperties; containerStyle?: React.CSSProperties; onCancel?: () => void; onOk?: () => void; header?: React.ReactNode; body?: React.ReactNode; icon?: React.ReactNode; hideBtn?: boolean; }; interface IFAlertParams extends Partial<AlertProps> { duration?: number; } declare const alert: { success: (params: string | IFAlertParams) => void; error: (params: string | IFAlertParams) => void; warn: (params: string | IFAlertParams) => void; warning: (params: string | IFAlertParams) => void; confirm: (params: string | IFAlertParams) => void; destroy: () => void; }; export default alert;