I have a Styled-Component called Headline that I wish to extend with another component called SubHeadline. Now, Headline looks like this:
const Headline = styled.h2`
// Css styles go here
`
What I would like to do is to both extend the styles of Headline AND change the tag type to something else (say h3). Something like this:
const SubHeadline = styled(Headline).h3`
// Css styles go here
`
Now the above does NOT work, but it illustrates what I would like to do.
Any ideas on how to do this?