@geist-ui/react
Version:
Modern and minimalist React UI library.
17 lines (16 loc) • 514 B
TypeScript
import React from 'react';
import { NormalTypes } from "../utils/prop-types";
export interface ToastAction {
name: string;
handler: (event: React.MouseEvent<HTMLButtonElement>, cancel: () => void) => void;
passive?: boolean;
}
export declare type ToastTypes = NormalTypes;
export interface Toast {
text?: string | React.ReactNode;
type?: ToastTypes;
delay?: number;
actions?: Array<ToastAction>;
}
declare const useToasts: () => [Toast[], (t: Toast) => void];
export default useToasts;