UNPKG

980 BTypeScriptView Raw
1import BaseComponent from "./base-component";
2
3declare class Offcanvas extends BaseComponent {
4 toggle(relatedTarget: HTMLElement): void;
5
6 show(relatedTarget: HTMLElement): void;
7
8 hide(): void;
9
10 /**
11 * Static method which allows you to get the offcanvas instance associated to a
12 * DOM element, you can use it like this: getInstance(offcanvas)
13 */
14 static getInstance(element: Element): Offcanvas;
15
16 static jQueryInterface: Offcanvas.jQueryInterface;
17
18 // static NAME: 'offcanvas';
19}
20
21declare namespace Offcanvas {
22 type jQueryInterface = (config?: "toggle" | "show" | "hide" | "dispose") => void;
23
24 enum Events {
25 show = "show.bs.offcanvas",
26
27 shown = "shown.bs.offcanvas",
28
29 hide = "hide.bs.offcanvas",
30
31 hidden = "hidden.bs.offcanvas",
32
33 focusin = "focusin.bs.offcanvas",
34
35 click = "click.bs.offcanvas",
36
37 clickDismiss = "click.dismiss.bs.offcanvas",
38 }
39}
40
41export default Offcanvas;