-
-
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
[Style] Add a withWidth HOC #4126
Conversation
@callemall/material-ui There are unrelated topics inside this PR. If you think this chunk is too big. I can break it down. |
That's fine by me! As long as we're consistent 😄
🎉 Finally! 🎉 |
@oliviertassinari doing a PR for that right now |
Should we put the Thoughts? |
@@ -27,7 +27,7 @@ class InkBar extends Component { | |||
* Override the inline-styles of the root element. | |||
*/ | |||
style: PropTypes.object, | |||
width: PropTypes.string.isRequired, | |||
width: PropTypes.number.isRequired, |
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.
Tabs documentation page -- I'm getting this warning in my console now:
warning.js:44 Warning: Failed propType: Invalid prop `width` of type `string` supplied to `InkBar`, expected `number`. Check the render method of `Tabs`.
@oliviertassinari Should we just do that as part of this PR? |
Yes, |
Done! I have
|
@oliviertassinari This looks good to me. Nice commits! |
Nice work @oliviertassinari! 💯 |
@oliviertassinari: I was going to use this new component but the widths used don't match the Material Design window sizes. Is there are reason they are different? |
@damonmaria Good question, Material-UI completely overlook the responsive aspect of the specification. In this PR, I was focusing on porting the mixin into a high order component. |
EventListener
component.styleResizable
mixin and remove it from the documentation. That's was our last mixin #RIP. Now, we should be able to enforcereact/prefer-es6-classes
.material-ui/lib
from the documentation.