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
[breakpoints] add back deleted getWidth
as width
with a spec
#8387
Conversation
What's the advantage of using it over |
LOL, primarily I had no idea it existed. I think it's worth exposing it in the interface because otherwise you are making the user dig into the code to know that the |
@rosskevin I have been documenting the breaking change in the CHANGELOG. |
I'm worried about extending the API where there is alternative, espically, when users can directly provides their own |
If they provide an incompatible values property, then they will also have to update the implementation of these methods. So in the case of extension, it is better to expose an interface than an implementation detail. |
@rosskevin But then, why not abstracting the following? const theme = createMuiTheme({
palette: {
secondary: green,
},
});
color: theme.palette.secondary.A200, How is that more intuitive than? const theme = createMuiTheme({
breakpoints: {
values: {
sm: 788,
}
},
});
width: theme.breakpoints.values.sm, |
I don't think your last comment is congruent with your previous postulate that Yes, accessing It is convenient, and obvious to have |
What do you mean by an invalid value property? |
@rosskevin Alright, at least we fixed the flow definitions :) |
@oliviertassinari deleted
getWidth
probably thinking it is unused. Well it is used and well loved by me ;).Also updated the typescript, which was still expecting the old named fn.