1 | import { CSSSelector } from '../shared';
|
2 | import Swiper from '../swiper-class';
|
3 |
|
4 | export interface NavigationMethods {
|
5 | /**
|
6 | * HTMLElement of "next" navigation button
|
7 | */
|
8 | nextEl: HTMLElement;
|
9 |
|
10 | /**
|
11 | * HTMLElement of "previous" navigation button
|
12 | */
|
13 | prevEl: HTMLElement;
|
14 |
|
15 | /**
|
16 | * Update navigation buttons state (enabled/disabled)
|
17 | */
|
18 | update(): void;
|
19 |
|
20 | /**
|
21 | * Initialize navigation
|
22 | */
|
23 | init(): void;
|
24 |
|
25 | /**
|
26 | * Destroy navigation
|
27 | */
|
28 | destroy(): void;
|
29 | }
|
30 |
|
31 | export interface NavigationEvents {
|
32 | /**
|
33 | * Event will be fired on navigation hide
|
34 | */
|
35 | navigationHide: (swiper: Swiper) => void;
|
36 | /**
|
37 | * Event will be fired on navigation show
|
38 | */
|
39 | navigationShow: (swiper: Swiper) => void;
|
40 | }
|
41 |
|
42 | export interface NavigationOptions {
|
43 | /**
|
44 | * String with CSS selector or HTML element of the element that will work
|
45 | * like "next" button after click on it
|
46 | *
|
47 | * @default null
|
48 | */
|
49 | nextEl?: CSSSelector | HTMLElement | null;
|
50 |
|
51 | /**
|
52 | * String with CSS selector or HTML element of the element that will work
|
53 | * like "prev" button after click on it
|
54 | *
|
55 | * @default null
|
56 | */
|
57 | prevEl?: CSSSelector | HTMLElement | null;
|
58 |
|
59 | /**
|
60 | * Toggle navigation buttons visibility after click on Slider's container
|
61 | *
|
62 | * @default false
|
63 | */
|
64 | hideOnClick?: boolean;
|
65 |
|
66 | /**
|
67 | * CSS class name added to navigation button when it becomes disabled
|
68 | *
|
69 | * @default 'swiper-button-disabled'
|
70 | */
|
71 | disabledClass?: string;
|
72 |
|
73 | /**
|
74 | * CSS class name added to navigation button when it becomes hidden
|
75 | *
|
76 | * @default 'swiper-button-hidden'
|
77 | */
|
78 | hiddenClass?: string;
|
79 |
|
80 | /**
|
81 | * CSS class name added to navigation button when it is disabled
|
82 | *
|
83 | * @default 'swiper-button-lock'
|
84 | */
|
85 | lockClass?: string;
|
86 | }
|