英文:
How to refactor from mui v4 to mui v5
问题
我有以下的样式类,我想在其中使用媒体查询,但我得到了以下错误:
react-dom.development.js:67 警告:不支持的样式属性 @media (max-width: 550px)。你是不是想说 @media (maxWidth: 550px)?
在 mui v5 中实现类似的查询解决方案的正确方法是什么?
英文:
I have the following style class that I want to use media query on but I am getting the following error:
> react-dom.development.js:67 Warning: Unsupported style property @media (max-width: 550px). Did you mean @media (maxWidth: 550px)?
iconFolder: {
fontSize: 45,
// IPHONE 5/SE
['@media (max-width: 550px)']: {
fontSize: 30,
},
},
What is the right way to implement similar query solution but in mui v5 ?
答案1
得分: 1
'@media (max-width: 550px)': {
fontSize: 30,
},
英文:
Try like this:
'@media (max-width: 550px)': {
fontSize: 30,
},
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论