-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename the color prop to just c #399
Comments
@probablyup any comments, if you don't like the idea that's fine |
Personally I prefer the long form of all the props because it's less confusing, albeit somewhat less convenient |
It's more about not having TS conflict than changing the prop name to something shorter. What is the suggested way of using xstyled when authoring component libraries, like the example above? |
I simply omit the html color property from the types, it's redundant anyway. I would rather do that than use the short form xstyled props since i think 1 letter variables are terrible |
Why do we have |
Legacy decision. Given that it's been around for a while, hesitant to remove, but don't want to add more of them. |
The quicker they go the less painful it will be 😄 Realistically though deprecation warnings can be added before completely removing them. Imo replacing them in a code base should be rather straight forward to automate anyway |
As far as I remember, |
How was that request different than the current one? Is it not conflicting with the native tags' |
Also the request doesn't revolve around renaming the prop necessarily to |
💬 Questions and Help
Here is an example:
The code above pisses typescript because the react
color
prop type (string
) is different than the xstyled one (string | ThemeProp<string, Theme>
).If I were to omit the color prop from the react div type it would work perfectly fine
The question is, wouldn't it be better to rename the xstyled color prop to something else, for example just
c
, following a similar pattern withw
andh
?The text was updated successfully, but these errors were encountered: