But, still not a good way to do it and again, unnatural syntax. Also, even typescript is giving me an error because it's not a string that's expecting but a TemplateStringArrays and when I try to do it always gives me an Ts error
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
the style passed into a styled component is just a parameter passed into a method --
button
in this case -- so you could doconst StyledWrapper = styled.button('')
if you don't like
const StyledWrapper = styled.button''
.And also it can be import like
import * as S from ./your-styled-component-file
.And use:
But, that's a compound component pattern...not a styled-component pattern
Maybe what you can do is
As the documentation says:
dev-to-uploads.s3.amazonaws.com/up...
But, still not a good way to do it and again, unnatural syntax. Also, even typescript is giving me an error because it's not a string that's expecting but a
TemplateStringArrays
and when I try to do it always gives me an Ts error