I am trying set the height of a styled component based on the props
of the React component it is in.
I tried the following:
const Styled = styled.div`
height: ${props => props.height}
`
class Parent extends React.Component {
render() {
return (
<Styled height={this.props.height}/>
)
}
}
But somehow it doesn't work. Can somebody help me out? What is the best practice for what I am trying to do?