forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuseToast.d.ts
35 lines (31 loc) · 931 Bytes
/
useToast.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare namespace Theme {
namespace Toast {
type Type = 'info' | 'dark' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
interface Options {
type: Type;
icon?: string;
title?: string;
dismissible?: boolean;
classlist?: string;
selector?: string;
autohide?: boolean;
template?: string;
delay?: number;
}
interface Instance {
instance: bootstrap.Toast | null;
element: HTMLElement | null;
show: () => boolean;
hide: () => boolean;
dispose: () => boolean;
remove: () => boolean;
message: (markup?: string) => string | boolean;
content: null | HTMLElement;
}
type Function = (message: string, options?: Theme.Toast.Options) => Theme.Toast.Instance
}
}