[英]How to style Next.js active link with Styled Components
[英]Style Link with styled components
我在 TypeScript React 应用程序中使用styled-components
,并且在它上面有一个路由器。
是否可以使用样式组件设置来自react-router-dom
Link
元素的样式?
像这样的东西可能:
const HeaderLink = styled.Link`
background-color: hotpink;
`
有可能,只需将Link
作为参数传递给styled
化的 function:
const StyledLink = styled(Link)`
color: green;
`;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.