forked from zyra/ionic-super-tabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.d.ts
100 lines (86 loc) · 2.17 KB
/
interface.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
export * from './components';
/**
* Configuration object for the `super-tabs` component.
*/
export interface SuperTabsConfig {
/**
* Max drag angle in degrees.
*
* Defaults to `40`
*/
maxDragAngle?: number;
/**
* Drag threshold in pixels.
*
* This value defines how far the user have to swipe for the swipe to be treated as a swipe gesture.
*
* Defaults to `20`
*/
dragThreshold?: number;
/**
* Allows elements inside tabs to be dragged or scrolled through.
*
* Setting this value to `true` will allow touch events to be propagated to child components.
*
* Defaults to `false`.
*/
allowElementScroll?: boolean;
/**
* Transition duration in milliseconds.
*
* This value is used for all transitions and animations.
*
* Defaults to `150`.
*/
transitionDuration?: number;
/**
* Side menu location.
*
* If this value is set to `right` or `left`, the super tabs component will avoid listening to swipe events
* in the specified region(s) to avoid interfering with a side menu event listeners.
*
* Defaults to `undefined`.
*/
sideMenu?: 'left' | 'right' | 'both';
/**
* Side menu threshold in pixels.
*
* Defaults to `50`.
*/
sideMenuThreshold?: number;
/**
* Short swipe duration in milliseconds.
*
* Short swipe is when a user quickly swipes between tabs. If the swipe duration is less than or equal to this
* configured value, then we assume that the user wants to switch tabs.
* To disable this behaviour set this value to `0`.
*
* Defaults to `300`
*/
shortSwipeDuration?: number;
/**
* Enable debug mode.
* Defaults to `false`.
*/
debug?: boolean;
/**
* Whether the container should look and avoid elements with avoid-super-tabs attribute
*/
avoidElements?: boolean;
nativeSmoothScroll?: boolean;
lazyLoad?: boolean;
unloadWhenInvisible?: boolean;
}
/**
* Event detail emitted by the `tabChange` event from the `super-tabs` component.
*/
export interface SuperTabChangeEventDetail {
/**
* Selected tab index.
*/
index: number;
/**
* Indicates whether the tab index has changed.
*/
changed: boolean;
}