-
-
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
[Fab] Extract from Button as new component #13573
Conversation
// assert.strictEqual(wrapper.hasClass(classes.flat), false); | ||
// assert.strictEqual(wrapper.hasClass(classes.textPrimary), false); | ||
// assert.strictEqual(wrapper.hasClass(classes.textSecondary), false); | ||
// }); |
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.
@eps1lon Is there a way to prevent the warning from causing these test to fail?
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 know it's probably not the perfect fix but if you use consoleErrorMock
you can intercept the warning which will prevent the warning and even write tests for them :)
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.
Ah, right, @eps1lon had done that for the other legacy variant test. Thanks!
@mbrookes Just in case you're wondering about codecov failure: Codecov will do that if HEAD points to a merge commit. An empty commit should do the trick. |
@eps1lon Thanks, good to know. I usually fix merge conflicts locally, but as it was a quick one, thought I'd use github. No time saved after all! |
Again!
@mbrookes I have done some minor changes, great work! This change makes me happy 💯. I can't wait v4 to remove all the deprecated code. |
I am currently using
But then trying to follow those instructions, TSC yells at me because there are no TS definitions for It seems the index re-exporter has been updated to include |
@wyqydsyq Sorry about that. We have forgotten the TypeScript defintions in this pull request! It's important, we will take care of it. If you have some time, feel free to give it a go. |
We haven't: https://github.com/mui-org/material-ui/pull/13573/files#diff-6656a4772d50c2237902506187b79972 Fab just need to be added to |
@wyqydsyq Do you want to add the missing import in the index.d.ts and overrides.d.ts? |
I would have submitted a PR but I have no idea about how TS is being used in this project, are these definitions being maintained by hand or generated by |
It's done by hand. |
The floating action button doesn't share many styles with the default button component.
We are extracting the variant into its own component. This way, we better isolate the concerns.
It's making the
Button
implementation more lightweight, a win for people overriding our styles.Upgrade path