Tailwind-Styled-Component
Tailwind-Styled-Component copied to clipboard
withComponent function not supported
Hey guys, thanks for the awesome library. I noticed there is no way to pass tw an Element to wrap on the fly. in styled-components I think you could do it with:
const StyledComponent = styled.div``
StyledComponent.withComponent(OtherComponent)
Got any idea how to use tailwind-styled-component with a component that is decided on runtime? Thank you!
Doesn't this work?
const StyledComponent = styled.div``
const newComponent = tw(StyledComponent)``