UNPKG

@lonelyplanet/dotcom-core

Version:

This package is meant to house some of our more common UI and shared libs across dotcom applications.

31 lines (30 loc) 833 B
import * as React from "react"; export declare type ToastType = "error" | "info" | "success" | "warning"; export interface IToastProps { message?: string; url?: string; buttonLabel?: string; type?: ToastType; duration?: number; animationDuration?: number; visible?: boolean; title?: string; onClose?: () => void; direction?: "bottom" | "top"; affixed?: boolean; } export interface IToastState { hasAnimated: boolean; isVisible: boolean; } export default class GlobalToast extends React.Component<IToastProps, IToastState> { props: IToastProps; state: IToastState; constructor(props: any); componentDidMount(): void; triggerAnimation(): void; componentWillReceiveProps(nextProps: any): void; open(): void; close(): void; render(): JSX.Element; }