图标按钮悬停 https://i.stack.imgur.com/lsYHX.png
这是我正在使用的 Material-UI 中的 iconButton。正如您所看到的,当您将鼠标悬停在图标上时,图标周围有一个轻微的灰色边框。禁用此功能的属性是什么?我在 Material-UI 文档中没有找到它,我需要摆脱这个灰色悬停功能。
Code:
<IconButton>
<BackButton />
</IconButton>
(替代方式)
您还可以通过 MuiThemeProvider 覆盖 IconButton 样式:
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
const theme = createMuiTheme({
overrides: {
MuiIconButton: {
root: {
'&:hover': {
backgroundColor: "$labelcolor"
}
}
}
}
})
并使用以下代码包装您要编辑的组件:
<MuiThemeProvider theme={theme}>
// Your Component here
</MuiThemeProvider>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)