-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[useTabs] Add explicit return type #36047
Conversation
Netlify deploy previewhttps://deploy-preview-36047--material-ui.netlify.app/ Bundle size report |
docs/pages/base/api/use-tabs.json
Outdated
"returnValue": { | ||
"tabsContextValue": { | ||
"type": { | ||
"name": "{\n /**\n * Id used as a prefix for the current Tabs.\n */\n idPrefix: string | undefined\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this prop to `false`.\n */\n value: string | number | false\n /**\n * Callback for setting new value.\n */\n onSelected: (e: React.SyntheticEvent, newValue: string | number | false) => void\n /**\n * The component orientation (layout flow direction).\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * The direction of the text.\n */\n direction: 'ltr' | 'rtl' | undefined\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: boolean | undefined\n}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to extract descriptions from nested objects
} | ||
|
||
export interface UseTabsReturnValue { | ||
tabsContextValue: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a JSDocs description please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I applied the changes. Now it looks good.
Thanks a lot, sorry I missed your message on changes requested |
UseTabs return value interface
closes useTabs in #35933
preview: https://deploy-preview-36047--material-ui.netlify.app/base/api/use-tabs/#return-value