Skip to content
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

Hidden component #90

Closed
brunoguedao opened this issue May 11, 2021 · 4 comments
Closed

Hidden component #90

brunoguedao opened this issue May 11, 2021 · 4 comments

Comments

@brunoguedao
Copy link

The Hidden component is out of material ui 5 version

./src/components/DashboardSidebar.js
Attempted import error: 'Hidden' is not exported from '@material-ui/core'.

@valipopescu
Copy link

valipopescu commented May 12, 2021

Please re install using npm rather than using other package managers and re-test. If you feel you really need to use your own package manager, please see how can it be made to respect the package-lock.json
In regards to changes in the upstream of the packages, we will update the package-lock.json once those packages are supported.

@philippbruhin
Copy link

It looks like in @material-ui/core": "5.0.0-alpha.28" import Hidden is still possible, wheras it is not in "@material-ui/core": "5.0.0-alpha.33".

For me it worked as described here.

Do not show on large and up

<Hidden lgUp>
  some additional code here
</Hidden>

Solution without Hidden component:

<Box display={{ lg: 'none' }}>
  some additional code here
</Box>

Do not show below large

<Hidden lgDown>
  some additional code here
</Hidden>

Solution without Hidden component:

<Box display={{ xs: 'none', lg: 'block' }}>
  some additional code here
</Box>

@BenjaminFJohns
Copy link

It looks like in @material-ui/core": "5.0.0-alpha.28" import Hidden is still possible, wheras it is not in "@material-ui/core": "5.0.0-alpha.33".

For me it worked as described here.

Do not show on large and up

<Hidden lgUp>
  some additional code here
</Hidden>

Solution without Hidden component:

<Box display={{ lg: 'none' }}>
  some additional code here
</Box>

Do not show below large

<Hidden lgDown>
  some additional code here
</Hidden>

Solution without Hidden component:

<Box display={{ xs: 'none', lg: 'block' }}>
  some additional code here
</Box>

This worked great for me running 5.0.0-alpha.34

@cunneen
Copy link

cunneen commented May 24, 2021

#93 seems to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants