I have a prop value that is used multiple times in the CSS decleration block.
Is it possible to set it to a variable initially to accomplish DRY:er code?
The following is a naive example, to show what I'm looking for. This doesn't work though - the variable size isn't accessible later on:
const Link = styled.a`
${props => {const size = props.size}};
background-color: ${size === 'medium' ? 'palevioletred' : 'black'};
width: 100%;
`;