@@ -9,36 +9,36 @@ export type Callback = (instance: Instance) => void;
9
9
*/
10
10
export type Ready = ( callback : Callback ) => void ;
11
11
export interface Options {
12
- /** * default value is "ltr" */
12
+ /** * default value is "ltr"*/
13
13
direction ?: 'rtl' | 'ltr' ;
14
14
defaultPanelComponent ?: ( ) => ReactNode | null ;
15
15
tabComponent ?: ( props : any ) => ReactNode ;
16
16
selectedTabID ?: string ; tabs ?: Array < TabData > ;
17
- /** * default value is true */
17
+ /** * default value is true */
18
18
accessibility ?: boolean ;
19
- /** * default value is false */
19
+ /** * default value is false */
20
20
isVertical ?: boolean ;
21
21
onLoad ?: ( ) => void ;
22
22
onInit ?: ( ) => void ;
23
23
onChange ?: ( { currentData, previousData, closedTabIDs, openedTabIDs } : { currentData : any , previousData : any , closedTabIDs : Array < string > , openedTabIDs : Array < string > } ) => void ;
24
- /** * defautl value function returns true */
24
+ /** * defautl value function returns true */
25
25
beforeSelect ?: ( e : React . MouseEvent < HTMLInputElement > , id : string ) => boolean ; onFirstSelect ?: ( { currentSelectedTabId, previousSelectedTabId } : { currentSelectedTabId : string , previousSelectedTabId : string } ) => void ;
26
26
onSelect ?: ( { currentSelectedTabId, previousSelectedTabId } : { currentSelectedTabId : string , previousSelectedTabId : string } ) => void ;
27
27
onOpen ?: ( openedTabIDs : Array < string > ) => void ;
28
- /** * defautl value function returns true */
28
+ /** * defautl value function returns true */
29
29
beforeClose ?: ( e : React . MouseEvent < HTMLInputElement > , id : string ) => boolean ;
30
30
onClose ?: ( closedTabIDs : Array < string > ) => void ; onDestroy ?: ( ) => void ;
31
31
}
32
32
export interface TabData {
33
33
id ?: string ;
34
34
title ?: string ;
35
35
tooltip ?: string ;
36
- /** * default value is true */
36
+ /** * default value is true */
37
37
closable ?: boolean ;
38
- /** * default value is false */
38
+ /** * default value is false */
39
39
lazy ?: boolean ;
40
40
iconClass ?: string ;
41
- /** * default value is false */
41
+ /** * default value is false */
42
42
disable ?: boolean ;
43
43
panelComponent ?: React . ReactNode | React . ReactElement | React . FunctionComponent ;
44
44
[ x : string ] : unknown ;
@@ -68,7 +68,9 @@ export interface Instance {
68
68
getPreviousData : ( ) => TabData ;
69
69
sort : ( tabIDs : Array < string > ) => Promise < { currentData : CurrentData , instance : Instance } > ;
70
70
}
71
- export const TabList : FunctionComponent < { } > ;
72
- export const PanelList : FunctionComponent < { } > ;
73
- function useDynTabs ( options ?: Options ) : [ TabList , PanelList , Ready ] ;
71
+ type Tablist = FunctionComponent < { } > ;
72
+ type Panellist = FunctionComponent < { } > ;
73
+ export const TabList : Tablist ;
74
+ export const PanelList : Panellist ;
75
+ declare const useDynTabs : ( options ?: Options ) => [ Tablist , Panellist , Ready ] ;
74
76
export default useDynTabs ;
0 commit comments