How to render pseudo before content dynamically in styled-component

前端 未结 3 1785
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-20 05:57

I\'m having a trouble of rendering pseudo before content dynamically in styled-components.

Am I doing something wrong?

I have no problem when I render pseudo bef

3条回答
  •  不思量自难忘°
    2021-02-20 06:45

    styled-components works the same as in sass, nothing different

    const Text = styled.span`
        &:before {
           content: ${props => !!props.before ? props.before : " 

提交回复
热议问题