-
Notifications
You must be signed in to change notification settings - Fork 876
fix(types): allow arbitrary keys in tv config #4992
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
Conversation
The accept prop did not work with image/* etc.
This reverts commit 5b75835.
I still need to address the issue I've described in #4888 (comment) because if a component has no |
commit: |
So I was able to solve #4992 (comment) pretty easily, but I am still strugling with allowing any value to be passed as the value of the variant (i.e. custom color) as any attempt of remapping the keys of the variants resulted in loss of typing of the original values. |
@benjamincanac I've used the type you've shared with me and it works great! One thing that comes to mind, but in my opinion is not a blocker is that it would be nice to still restrict boolean variants to just boolean because now we allow string to be passed in as well. |
Co-authored-by: Jakub <[email protected]> Co-authored-by: Benjamin Canac <[email protected]>
Co-authored-by: Jakub <[email protected]> Co-authored-by: Benjamin Canac <[email protected]>
Co-authored-by: Jakub <[email protected]> Co-authored-by: Benjamin Canac <[email protected]>
π Linked issue
Resolves #4888
β Type of change
π Description
I've loosened the types around tailwind variants to allow arbitary keys to be passed in as before TS would report an error for custom variants/slots being used in other block of the config.
Ideally we would have this fully typed, but as I discussed with @benjamincanac we cannot do that as of now due to some technical limitations.
π Checklist