MUI/Icon 让一切消失
MUI/Icon makes everything dissapear
当我尝试在反应中导入和使用 mui 图标时,它使整个 div 消失,只剩下背景图像,我安装了:emotion/react、emotion/styled, mui/icons-material, mui/material, 样式组件, mui/styled-engine-sc
<div className="login">
<h1>Login</h1>
<div className="form">
<EmailIcon className='icon'/>
<input type="text" placeholder="Email"></input>
<input type="password" placeholder='Password'></input>
</div>
<div className="buttons">
<button id='login'>Login</button>
<button id='register'>Register</button>
</div>
</div>
)
我复制了你的代码,安装了依赖项,对我来说效果很好。我建议更新这些依赖项:
npm update @mui/material @mui/icons-material @emotion/styled @emotion/react
当我尝试在反应中导入和使用 mui 图标时,它使整个 div 消失,只剩下背景图像,我安装了:emotion/react、emotion/styled, mui/icons-material, mui/material, 样式组件, mui/styled-engine-sc
<div className="login">
<h1>Login</h1>
<div className="form">
<EmailIcon className='icon'/>
<input type="text" placeholder="Email"></input>
<input type="password" placeholder='Password'></input>
</div>
<div className="buttons">
<button id='login'>Login</button>
<button id='register'>Register</button>
</div>
</div>
)
我复制了你的代码,安装了依赖项,对我来说效果很好。我建议更新这些依赖项:
npm update @mui/material @mui/icons-material @emotion/styled @emotion/react