import React, { Component } from 'react'; import { ToastGroupContext } from './ToastGroupContext'; export interface ToastPropsStrict { /** Adds one or more classnames for an element */ className?: string; children?: React.ReactNode; /** How long the Toast stays on screen, default value is 8000 (milliseconds) */ duration?: number; /** Text for the primary button */ primaryActionName?: boolean | string; /** Function that fires when the user clicks on the primary button/action */ onPrimaryActionClick?: (e: React.SyntheticEvent) => void; /** Function that fires when the user clicks the close icon */ onClose?: (e?: React.SyntheticEvent) => void; /** Function that fires when the user clicks on the secondary button/action */ onSecondaryActionClick?: (e: React.SyntheticEvent) => void; /** Makes Toast open through ReactDOM.createPortal */ portal?: HTMLElement | boolean; /** Text for the secondary button */ secondaryActionName?: boolean | string; /** Determines the visual appearance and icon of the toast */ status?: 'info' | 'critical' | 'success' | 'warning'; /** The message displayed to the user */ title: string; } export interface ToastProps extends ToastPropsStrict { [propName: string]: any; } interface ToastState { visible: boolean; } export declare class Toast extends Component { static Group: React.ForwardRefExoticComponent & React.RefAttributes>; static contextType: React.Context<{ isInToastGroup: boolean; }>; context: React.ContextType; static defaultProps: { status: string; duration: number; portal: boolean; }; private timeout; constructor(props: ToastProps); componentDidMount(): void; componentWillUnmount(): void; handleClose: (e?: React.SyntheticEvent) => void; hasPrimaryAction(): boolean; hasSecondaryAction(): boolean; private clearSubscription; private getIconNameByStatus; render(): JSX.Element; } export {};