-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[material-ui][Stepper] Generate class for nonLinear prop
#42620
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
[material-ui][Stepper] Generate class for nonLinear prop
#42620
Conversation
|
| import StepConnector, { stepConnectorClasses } from '@mui/material/StepConnector'; | ||
| import StepContent, { stepContentClasses } from '@mui/material/StepContent'; | ||
| import Stepper, { stepperClasses as classes } from '@mui/material/Stepper'; | ||
| import Stepper, { stepperClasses as classes, stepperClasses } from '@mui/material/Stepper'; |
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.
stepperClasses is already imported and named as classes, so you can use classes instead of importing stepperClasses again
| setProps({ alternativeLabel: true }); | ||
|
|
||
| expect(stepper).to.have.class(classes.nonLinear) |
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 believe these are not required, just testing presence of nonLinear class is required, which is what line 272 is doing.
per PR review Signed-off-by: Alexis Morin <[email protected]>
DiegoAndai
left a comment
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.
Hey @alexismo, thanks for working on this. Also thanks @sai6855 for the review.
The addition of the class looks good. For consistency, may I ask you to also add the nonLinear key to the MuiStepper styleOverrides? You should be able to follow how the alternativeLabel key is added here.
To confirm that the requested functionality is supported, this is what you are looking for, right?: codesandbox
Signed-off-by: Alexis Morin <[email protected]>
|
Thank you @DiegoAndai for the review 🙏 The example you're showing in CSB looks correct. Here it is with a styleOverrides applied to |
Netlify deploy previewhttps://deploy-preview-42620--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
ZeeshanTamboli
left a comment
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 @alexismo for the pull request. I pushed two commits to update the test description and apply prettier. Thanks to @sai6855 and @DiegoAndai for the reviews. I believe we can merge this now and also to the master branch for v5.
nonLinear prop
Signed-off-by: Alexis Morin <[email protected]> Co-authored-by: ZeeshanTamboli <[email protected]>
Signed-off-by: Alexis Morin <[email protected]> Co-authored-by: ZeeshanTamboli <[email protected]>
This PR adds the nonLinear utility class to the Stepper component when the nonLinear prop is used.
Deploy preview: https://deploy-preview-42620--material-ui.netlify.app/material-ui/react-stepper/#non-linear
Closes #42360