First of all: amazing work!
I have seen this example by @mxstbr
const Title = styled.h1`
font-size: 3em;
color: ${constants.brandColor};
margin-bottom: 0.25em;
`;
From what I understand this would generate CSS, but what would happen in this case:
const MyComponent extends React.Component {
state = { left: 0 };
render() {
const FlyingBall = styled.div`
position: absolute;
width: 1rem;
height: 1rem;
left: ${this.state.left}
`;
return <FlyingBall />;
}
I would expect this generates only the CSS with left: 0;. Is this correct?
First of all: amazing work!
I have seen this example by @mxstbr
From what I understand this would generate CSS, but what would happen in this case:
I would expect this generates only the CSS with
left: 0;. Is this correct?