-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[useMenu][base] Add return interface for useMenu hook #36376
Conversation
…ircular dependency problem
Netlify deploy previewhttps://deploy-preview-36376--material-ui.netlify.app/ Bundle size report |
export interface MenuItemState { | ||
disabled: boolean; | ||
highlighted: boolean; | ||
} |
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.
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
.
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 move these types into src/MenuItemUnstyled/MenuItemUnstyled.types.ts
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.
Thanks for the review. Have amended PR
export interface MenuItemState { | ||
disabled: boolean; | ||
highlighted: boolean; | ||
} |
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 move these types into src/MenuItemUnstyled/MenuItemUnstyled.types.ts
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.
Thanks for addressing the feedback and for the contribution! Looks great!
Adds return interface for
useMenu
for #35933