Skip to content

Commit cdba541

Browse files
adding types for plugins, moreButtonPlugin
1 parent d709b4f commit cdba541

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,5 @@ export interface Instance {
9595
}
9696
type Tablist = FC<PropsWithChildren<{}>>;
9797
type Panellist = FunctionComponent<{}>;
98-
declare const useDynTabs: (options?: Options) => [Tablist, Panellist, Ready];
98+
declare const useDynTabs: (options?: Options, plugins?: Array<(instance: any, components: any) => void>) => [Tablist, Panellist, Ready];
9999
export default useDynTabs;

plugins/moreButtonPlugin/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @param {any} instance - developer instance of Tabs
3+
* @param {any} components - references of all components in the library
4+
*/
5+
declare const MoreButtonPlugin: (instance: any, components: any) => void;
6+
export default MoreButtonPlugin;

plugins/moreButtonPlugin/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"main": "../../lib/cjs/plugins/moreButtonPlugin/index.js",
3-
"module": "../../lib/esm/plugins/moreButtonPlugin/index.js",
4-
"sideEffects": false
5-
}
2+
"main": "../../lib/cjs/plugins/moreButtonPlugin/index.js",
3+
"module": "../../lib/esm/plugins/moreButtonPlugin/index.js",
4+
"types": "./index.d.ts",
5+
"sideEffects": false
6+
}

0 commit comments

Comments
 (0)