Provide an example of styled Interweave component
See original GitHub issueHello there,
First of all, thank you so much for this awesome plugin.
I’m using it on a Gatsby site, and with most of my components I’m applying a styled-components approach. However I wasn’t able to figure out how to make it work with Interweave. Could you provide an example?
I think it happens because Interweave by default strips off all attributes, including className
, and styled
library actually passes down a random class name every run, so it is just never applied. I know that Interweave can accept a class name prop inside of attributes object, however there’s probably no way to make styled to pass it down this way.
Currently I am using css modules as a workaround, so I import the css, get the class names, and then pass it down to Interweave. But this is really inconvenient, and I would love to be able to only use styled components.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Is added in next version.
Ok makes sense. I’ll add a
className
prop to support this.