Reputation: 143
I have some Hidden components below:
<Hidden smUp>
...
</Hidden>
<Hidden xsDown>
...
</Hidden>
It's deprecated in V5. So how can I use Paper & Box components as in the migration documents?
Sorry but it's quite difficult to follow the guide.
Upvotes: 1
Views: 2529
Reputation: 1180
In the Migration from v4 documentation, this is actually pretty good explained.
You have to replace
<Hidden smUp>
...
<Hidden/>
with
<Paper sx={{ display: { xs: "block", sm: "none" } }}>
...
</Paper>
// or
<Box sx={{ display: { xs: "block", sm: "none" } }}>
...
</Box>
and
<Hidden xsDown>
...
</Hidden>
with
<Paper sx={{ display: { xs: "none", sm: "block" } }}>
...
</Paper>
// or
<Box sx={{ display: { xs: "none", sm: "block" } }}>
...
</Box>
Upvotes: 4