Skip to content

Commit

Permalink
Export the hook types from components root's index
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Feb 8, 2023
1 parent de15ccc commit 68759c9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
28 changes: 26 additions & 2 deletions docs/pages/base/api/use-tab-panel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
{
"parameters": {},
"returnValue": {},
"parameters": {
"value": {
"type": {
"name": "number | string",
"description": "The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected."
},
"required": true
}
},
"returnValue": {
"getRootProps": {
"type": {
"name": "() => {\n 'aria-labelledby': string | undefined\n hidden: boolean\n id: string | undefined\n}",
"description": "Resolver for the root slot's props."
},
"required": true
},
"hidden": {
"type": {
"name": "boolean",
"description": "If `true`, it indicates that the tab panel will be hidden."
},
"default": "false",
"required": true
}
},
"name": "useTabPanel",
"filename": "/packages/mui-base/src/TabPanelUnstyled/useTabPanel.ts",
"demos": "<ul><li><a href=\"/base/react-tabs/#hooks\">Unstyled Tabs</a></li></ul>"
Expand Down
11 changes: 10 additions & 1 deletion docs/translations/api-docs/use-tab-panel/use-tab-panel.json
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{ "hookDescription": "", "parametersDescriptions": {}, "returnValueDescriptions": {} }
{
"hookDescription": "",
"parametersDescriptions": {
"value": "The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected."
},
"returnValueDescriptions": {
"getRootProps": "Resolver for the root slot's props.",
"hidden": "If <code>true</code>, it indicates that the tab panel will be hidden."
}
}
1 change: 1 addition & 0 deletions packages/mui-base/src/TabPanelUnstyled/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export { default as tabPanelUnstyledClasses } from './tabPanelUnstyledClasses';
export * from './tabPanelUnstyledClasses';

export { default as useTabPanel } from './useTabPanel';
export * from './useTabPanel.types';
2 changes: 1 addition & 1 deletion packages/mui-base/src/TabPanelUnstyled/useTabPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { UseTabPanelParameters, UseTabPanelReturnValue } from './useTabPanel.typ
*
* - [useTabPanel API](https://mui.com/base/api/use-tab-panel/)
*/
function useTabPanel(parameters: UseTabPanelParameters):UseTabPanelReturnValue {
function useTabPanel(parameters: UseTabPanelParameters): UseTabPanelReturnValue {
const { value } = parameters;

const context = useTabContext();
Expand Down

0 comments on commit 68759c9

Please sign in to comment.