【发布时间】:2020-01-30 23:17:05
【问题描述】:
我创建了一个带有自定义属性test 的简单样式组件,但是在渲染时,test 属性只是没有出现在 div dom 中,发生了什么?
const StyledDiv = styled.div<{
test?: boolean;
}>`
color:red;
`;
//in render function...
<StyledDiv test>it's just test</StyledDiv>
【问题讨论】: