freenowtech / wave

Design System of FREE NOW
https://wave.free-now.com
Apache License 2.0
64 stars 23 forks source link

Some components are not compatible with styled-components v6 #344

Open arturmiglio opened 1 year ago

arturmiglio commented 1 year ago

Some components that use react-select can break (or fail in test environmets) when using styled-components latest (tested with 6.0.5).

What was expected to happen?

Eg.: PhoneInput, when user opens the Country select, makes the example app (below) crash with:

Cannot read properties of undefined (reading 'borderRadius')

Reproduction

https://codesandbox.io/s/styled-components-6-issue-gffvqg

arturmiglio commented 5 months ago

Using styled-components v6 also generates a ton of console.errors since it doesn't check if a prop should be forwarded to the DOM element anymore. All custom props should be using the $ transient prop prefix.

Examples: