- I totally forgot that styled components has a
has
prop that can override the element of the element eg:
const StyledH1 = styled.h1``
() => <StyledH1 as={"h2"}> Turn me into a h2 </StyledH1>
has
prop that can override the element of the element eg:
const StyledH1 = styled.h1``
() => <StyledH1 as={"h2"}> Turn me into a h2 </StyledH1>