@@ -9,36 +9,36 @@ export type Callback = (instance: Instance) => void;
99 */
1010export type Ready = ( callback : Callback ) => void ;
1111export interface Options {
12- /** * default value is "ltr" */
12+ /** * default value is "ltr"*/
1313 direction ?: 'rtl' | 'ltr' ;
1414 defaultPanelComponent ?: ( ) => ReactNode | null ;
1515 tabComponent ?: ( props : any ) => ReactNode ;
1616 selectedTabID ?: string ; tabs ?: Array < TabData > ;
17- /** * default value is true */
17+ /** * default value is true */
1818 accessibility ?: boolean ;
19- /** * default value is false */
19+ /** * default value is false */
2020 isVertical ?: boolean ;
2121 onLoad ?: ( ) => void ;
2222 onInit ?: ( ) => void ;
2323 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 */
2525 beforeSelect ?: ( e : React . MouseEvent < HTMLInputElement > , id : string ) => boolean ; onFirstSelect ?: ( { currentSelectedTabId, previousSelectedTabId } : { currentSelectedTabId : string , previousSelectedTabId : string } ) => void ;
2626 onSelect ?: ( { currentSelectedTabId, previousSelectedTabId } : { currentSelectedTabId : string , previousSelectedTabId : string } ) => void ;
2727 onOpen ?: ( openedTabIDs : Array < string > ) => void ;
28- /** * defautl value function returns true */
28+ /** * defautl value function returns true */
2929 beforeClose ?: ( e : React . MouseEvent < HTMLInputElement > , id : string ) => boolean ;
3030 onClose ?: ( closedTabIDs : Array < string > ) => void ; onDestroy ?: ( ) => void ;
3131}
3232export interface TabData {
3333 id ?: string ;
3434 title ?: string ;
3535 tooltip ?: string ;
36- /** * default value is true */
36+ /** * default value is true */
3737 closable ?: boolean ;
38- /** * default value is false */
38+ /** * default value is false */
3939 lazy ?: boolean ;
4040 iconClass ?: string ;
41- /** * default value is false */
41+ /** * default value is false */
4242 disable ?: boolean ;
4343 panelComponent ?: React . ReactNode | React . ReactElement | React . FunctionComponent ;
4444 [ x : string ] : unknown ;
@@ -68,7 +68,9 @@ export interface Instance {
6868 getPreviousData : ( ) => TabData ;
6969 sort : ( tabIDs : Array < string > ) => Promise < { currentData : CurrentData , instance : Instance } > ;
7070}
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 ] ;
7476export default useDynTabs ;
0 commit comments