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