Styled components lets us write actual CSS in JS. This means we can use all the features of CSS - media queries, all pseudo selectors, nesting, etc.
Conditional Styling in styled-components
Since inside the back-ticks of the styled components is basically a string template, we can manipulate the CSS values inside of it:
We render the StyledPara like so:
We use the props to render the content conditionally, or ideally add the style properties based on the dynamic content inside the callback function, which is inside CSS styling of the styled-component.