styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.28k stars 105 forks source link

Color prop responsive type #257

Closed AlfonzAlfonz closed 3 years ago

AlfonzAlfonz commented 3 years ago

🐛 Bug Report

Color prop type definition from xstyled interferes with react definition, which removes responsive definition from types. I would gladly fix this if you tell me where is the problem.

To Reproduce

  <x.div color={{ _: "red" }}>Test</x.div>

Expected behavior

Typescript should allow this, otherwise, it works fine.

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/xstyled-color-type-error-b4fw2

gregberge commented 3 years ago

Fixed in v3, please be patient!

gregberge commented 3 years ago

Fixed in v3.

AlfonzAlfonz commented 3 years ago

Unfortunately, it seems that there are still problems with the type of color prop.

Updated sandbox example: https://codesandbox.io/s/xstyled-color-type-error-forked-v3kz2?file=/src/App.tsx

AlfonzAlfonz commented 3 years ago

I'm sorry but I was unable reopen this issue, should I open a new one? @gregberge