-
-
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
[base] Move hooks to their own directories #36235
Conversation
@@ -1,7 +1,8 @@ | |||
import * as React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import clsx from 'clsx'; | |||
import { useButton } from '@mui/base/ButtonUnstyled'; | |||
|
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.
Running yarn docs:typescript:formatted
creates this space. I don't know why 😅
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.
This could be interesting to investigate and debug (not necessarily in this PR, though) 😁
@@ -1,6 +1,7 @@ | |||
import * as React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import SelectUnstyled, { selectUnstyledClasses } from '@mui/base/SelectUnstyled'; | |||
|
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.
Same reason as above
@@ -1,6 +1,7 @@ | |||
import * as React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import SelectUnstyled, { selectUnstyledClasses } from '@mui/base/SelectUnstyled'; | |||
|
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.
Same reason as above
I found a few occurrences of the old paths in the docs left (FormControl, Input, Slider, Snackbar). Also, the API pages shows an incorrect import path of the hooks: (https://deploy-preview-36235--material-ui.netlify.app/base/api/use-button/) |
|
The useAutocomplete import is broken: https://deploy-preview-36235--material-ui.netlify.app/base/api/use-autocomplete/ |
My bad. Addressed it. |
6682c22
to
cc36ad5
Compare
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 haven't found anything wrong. Good job!
Let's get it merged ASAP to avoid conflicts.
Would you mind working on a codemod to help devs with the migration (in a separate PR)?
Breaking Changes
useSelect
) are no longer exported from{Component}Unstyled
directories and instead they have their own directories.You can use this codemod to help with the migration.
Closes #34401
Closes #33903