Argument of type '((props: HTMLAttributes<HTMLDivElement>) => Element) & { class: (props: HTMLAttributes<HTMLDivElement>) => string; }' is not assignable to parameter of type 'string | number | ((props: HTMLAttributes<HTMLDivElement> & { theme?: DefaultTheme | undefined; as?: string | number | symbol | undefined; class?: any; children?: any; }) => string | ... 2 more ... | undefined)'.
Type '((props: HTMLAttributes<HTMLDivElement>) => Element) & { class: (props: HTMLAttributes<HTMLDivElement>) => string; }' is not assignable to type '(props: HTMLAttributes<HTMLDivElement> & { theme?: DefaultTheme | undefined; as?: string | number | symbol | undefined; class?: any; children?: any; }) => string | ... 2 more ... | undefined'.
Type 'Element' is not assignable to type 'string | number | CSSAttribute | undefined'.
Type 'null' is not assignable to type 'string | number | CSSAttribute | undefined'.ts(2345)
Are there any plans to support this feature? And is there any workaround for this at the moment?
This works with styled-components:
But not with solid-styled-components:
Are there any plans to support this feature? And is there any workaround for this at the moment?
Read more: https://styled-components.com/docs/advanced#referring-to-other-components