jacob-ebey / styled-components-ts

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress and the added benefits of TypeScript 💅
Do What The F*ck You Want To Public License
150 stars 5 forks source link

Argument of type * is not assignable to parameter of type 'ThemedStyledFunction<any, any, any>' #10

Closed baohouse closed 6 years ago

baohouse commented 6 years ago
screen shot 2018-04-14 at 1 01 29 pm

I don't suppose you've ever had to deal with React components from a third-party library that has its own types. I'm getting this error:

Argument of type 'typeof Spin' is not assignable to
parameter of type 'ThemedStyledFunction<any, any, any>'.
Property 'attrs' is missing in type 'typeof Spin'.
jacob-ebey commented 6 years ago

You have to wrap the component in a styled-component function, see the PR #14

jacob-ebey commented 6 years ago

https://github.com/jacob-ebey/styled-components-ts/blob/master/examples/ThirdParty.tsx