【发布时间】:2021-10-25 05:38:37
【问题描述】:
我想使用情感将样式传递给两个样式化的组件。
我试过这样,但是 ${commonStyle} 没有继承到 styled.a 和 styled.span:
const commonStyle = css`
color: #000;
font-size: 1.6rem;
`;
const commonLink = styled.a`
${commonStyle}
`;
const whiteLink = styled.span`
${commonStyle}
color: #fff;
`;
如何使用情感扩展 css?
【问题讨论】: