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

[useMenu][base] Add return interface for useMenu hook #36376

Merged
merged 11 commits into from
Mar 6, 2023

Conversation

HeVictor
Copy link
Contributor

Adds return interface for useMenu for #35933

@mui-bot
Copy link

mui-bot commented Feb 28, 2023

Netlify deploy preview

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

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against c98b5be

export interface MenuItemState {
disabled: boolean;
highlighted: boolean;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call-out that I had to refactor these types from useMenu.types.ts as a circular dependency error was occurring between the newly added UseMenuReturnValue type within useMenu.type.ts as that interface imported from MenuUnstyledContext.ts which in turn imported the above two types from useMenu.type.ts.

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 move these types into src/MenuItemUnstyled/MenuItemUnstyled.types.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. Have amended PR

@zannager zannager added the component: menu This is the name of the generic UI component, not the React module! label Mar 1, 2023
@zannager zannager requested a review from mnajdova March 1, 2023 10:55
@samuelsycamore samuelsycamore changed the title Add return interface for use menu [useMenu][base] Add return interface for useMenu hook Mar 1, 2023
@samuelsycamore samuelsycamore added the package: base-ui Specific to @mui/base label Mar 1, 2023
export interface MenuItemState {
disabled: boolean;
highlighted: boolean;
}
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 move these types into src/MenuItemUnstyled/MenuItemUnstyled.types.ts

@HeVictor HeVictor requested review from hbjORbj and removed request for mnajdova March 3, 2023 13:09
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 3, 2023
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 4, 2023
Copy link
Member

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the feedback and for the contribution! Looks great!

@hbjORbj hbjORbj merged commit 5cda6ad into mui:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants