当我将 React-Router 链接添加到 Typography 元素时,我似乎无法摆脱下划线,即使 underline="none"
或 "hover"
被选中。
来自 useStyles:
title: {
display: "none",
[theme.breakpoints.up("sm")]: {
display: "block",
},
},
来自渲染(Typography 元素在工具栏中,不确定这是否有所不同):
<Typography
className={classes.title}
variant="h6"
noWrap
component={Link}
to="/"
color="textPrimary"
underline="none"
>
Your Text Here
</Typography>
最佳答案
您需要在链接 CSS 中指定以下内容:
textDecoration: "none",
boxShadow: "none"
关于reactjs - Material-ui Typography with router link always underlined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66554678/