import React, { Component, HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
import { HasPlatform } from '../../types';
import { AdaptivityProps } from '../../hoc/withAdaptivity';
export declare type AlertActionInterface = AlertProps['actions'][0];
export interface AlertProps extends HTMLAttributes, HasPlatform, AdaptivityProps {
actionsLayout?: 'vertical' | 'horizontal';
actions?: Array<{
title: string;
action?: VoidFunction;
autoclose?: boolean;
mode: 'cancel' | 'destructive' | 'default';
}>;
header?: ReactNode;
text?: ReactNode;
onClose?: VoidFunction;
}
export interface AlertState {
closing: boolean;
}
declare type TransitionEndHandler = (e?: TransitionEvent) => void;
declare type ItemClickHander = (item: AlertActionInterface) => () => void;
declare class Alert extends Component {
constructor(props: AlertProps);
element: React.RefObject;
private transitionFinishTimeout;
static defaultProps: AlertProps;
onItemClick: ItemClickHander;
onClose: VoidFunction;
stopPropagation: MouseEventHandler;
waitTransitionFinish(eventHandler: TransitionEndHandler): void;
renderHeader(header: ReactNode): JSX.Element;
renderText(text: ReactNode): JSX.Element;
renderAction: (action: {
title: string;
action?: VoidFunction;
autoclose?: boolean;
mode: "default" | "cancel" | "destructive";
}, i: number) => JSX.Element;
render(): JSX.Element;
}
declare const _default: typeof Alert;
export default _default;