linaria icon indicating copy to clipboard operation
linaria copied to clipboard

add "shouldForwardProp" support

Open fishead opened this issue 4 years ago • 1 comments

Describe the feature

Emotion has feature called Customizing prop forwarding which allow me pass custom attributes.

Motivation

I use linaria with Taro. Taro is a tool to support developers build WeChat mini program with React, but mini program has many custom components which have different attributes compare to HTML tags, so when I wrap a custom component with linaria, all custom attributes got filtered.

Possible implementations

Related Issues

#555 https://github.com/NervJS/taro/issues/7163

fishead avatar Jul 22 '21 07:07 fishead

Styled components works around uses transient props: https://styled-components.com/docs/api#transient-props So a $ sign to know what should be passed to the DOM and what should not. Would this make sense here as well? It should be statically analyzable at build time from what I can tell.

garthenweb avatar Oct 31 '22 15:10 garthenweb