Open karlhorky opened 4 years ago
With Styled Components 5.1 out, I'm currently trying to integrate the props
export from @styled-system/should-forward-prop
into a utility in my company's component library (which uses Styled Components) to keep style props from passing into the DOM.
I'd be happy to open a PR here to include the utility (and a create…
version as is currently available for Emotion) for styled-components, but I'm not sure what the export would be. The default export for this package is for Emotion, but both libraries use an API named shouldForwardProp
, each with a different interface.
@jxnblk any ideas? Seems like a breaking change for this package would be inevitable given the naming issue.
If this is still relevant, to avoid extra props leaking to the DOM and causing warnings, use the
shouldForwardProp
support that landed instyled-components@5.1.0
:https://github.com/styled-components/styled-components/releases/tag/v5.1.0
Original PR: https://github.com/styled-components/styled-components/pull/3006
Related:
styled-system
issue: https://github.com/styled-system/styled-system/issues/1253cc @mrfelton