Material-ui: [docs] Document withWidth utility function

Created on 25 Apr 2018  路  1Comment  路  Source: mui-org/material-ui


Would it be useful to have this function within Dialog's import to be a more generic, utility function? Such as isMobileScreen or isFullScreen that can safely be wrapped around any component? I often find myself using it in this manner where I need a boolean telling me if I am mobile or not, where something like <Hidden /> wouldn't be useful.

If there is a different way to acquire what breakpoint the window is currently using, I apologize for making this issue 馃槂

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior


Have withMobileDialog be a utility function rather than under Dialog

docs enhancement

Most helpful comment

@Auchindoun The implementation of withMobileDialog is pretty empty.
https://github.com/mui-org/material-ui/blob/1839c0804fd9671f42cf5bc09160869afc9e08c4/packages/material-ui/src/Dialog/withMobileDialog.js#L10-L22
It's a sugar wrapper on top of withWidth. I agree, we should be documenting it.

>All comments

@Auchindoun The implementation of withMobileDialog is pretty empty.
https://github.com/mui-org/material-ui/blob/1839c0804fd9671f42cf5bc09160869afc9e08c4/packages/material-ui/src/Dialog/withMobileDialog.js#L10-L22
It's a sugar wrapper on top of withWidth. I agree, we should be documenting it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chris-hinds picture chris-hinds  路  3Comments

sys13 picture sys13  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

newoga picture newoga  路  3Comments

ryanflorence picture ryanflorence  路  3Comments