Skip to content

Commit

Permalink
feat(typescript): Add new type for custom tabs function components
Browse files Browse the repository at this point in the history
  • Loading branch information
danez authored Apr 17, 2022
1 parent 4e3eff1 commit 20a4ba0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export interface TabPanelProps
selectedClassName?: string | undefined;
}

export interface ReactTabsFunctionComponent<P = {}> extends FunctionComponent<P> {
tabsRole: 'Tabs' | 'TabList' | 'Tab' | 'TabPanel';
}

export const Tabs: FunctionComponent<TabsProps>;
export const TabList: FunctionComponent<TabListProps>;
export const Tab: FunctionComponent<TabProps>;
Expand Down

0 comments on commit 20a4ba0

Please sign in to comment.