styled-components / xstyled

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

fix(typing): Support any valid number for utility props that needs it #357

Closed kamalbennani closed 2 years ago

kamalbennani commented 2 years ago

Summary

Based on the code itself and the website, some declarations don't match the actual typing of some props.

For instance, sizing props such as w/h or even border/borderWidth should accept any valid number (not only the numbers defined in the theme). "Any valid value is accepted in width, numbers are converted to px, other units have to be specified."

So, I went through all the exposed props and I've updated the typing to add the missing valid type which is number in this case.

kamalbennani commented 2 years ago

Hi @gregberge 👋 I was wondering if my two opened PRs are approved and fully tested (with the one that was merged previously), would it be possible to release a patch version of the library ^^' Let me know if I missed anything, I'd be happy to take care of it. Thanks.