1 | import { IAlert, AlertProps as BaseAlertProps } from "../Alert";
|
2 | import { BoxProps } from "../Box";
|
3 | import { Omit } from "../common-types";
|
4 | import { Position } from "toasted-notes";
|
5 | import * as React from "react";
|
6 |
|
7 | export interface IToast extends IAlert {
|
8 | |
9 |
|
10 |
|
11 | title?: string;
|
12 | |
13 |
|
14 |
|
15 | isClosable?: boolean;
|
16 | |
17 |
|
18 |
|
19 | onClose?: () => void;
|
20 | |
21 |
|
22 |
|
23 | description?: string;
|
24 | |
25 |
|
26 |
|
27 | duration?: number | null;
|
28 | |
29 |
|
30 |
|
31 | position?: keyof typeof Position;
|
32 | }
|
33 |
|
34 | interface RenderOption {
|
35 | render?: (props: { onClose: () => void; id: string }) => React.ReactNode;
|
36 | }
|
37 | export type useToastOptions = IToast & RenderOption;
|
38 | declare const useToast: () => (props: useToastOptions) => void;
|
39 |
|
40 | export default useToast;
|