Skip to content
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

Merged
merged 11 commits into from
Mar 7, 2023

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Feb 4, 2023

UseTabs return value interface

closes useTabs in #35933

preview: https://deploy-preview-36047--material-ui.netlify.app/base/api/use-tabs/#return-value

@mui-bot
Copy link

mui-bot commented Feb 4, 2023

Netlify deploy preview

https://deploy-preview-36047--material-ui.netlify.app/

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against 19ac5fd

"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}",
Copy link
Contributor Author

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

@zannager zannager added the component: tabs This is the name of the generic UI component, not the React module! label Feb 6, 2023
@zannager zannager requested a review from mnajdova February 6, 2023 11:33
}

export interface UseTabsReturnValue {
tabsContextValue: {
Copy link
Member

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.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 21, 2023
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 25, 2023
@ZeeshanTamboli ZeeshanTamboli added docs Improvements or additions to the documentation typescript package: base-ui Specific to @mui/base labels Mar 7, 2023
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a 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.

@ZeeshanTamboli ZeeshanTamboli merged commit 38a151a into mui:master Mar 7, 2023
@sai6855
Copy link
Contributor Author

sai6855 commented Mar 7, 2023

Thanks a lot, sorry I missed your message on changes requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants