Skip to content
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

[TypeScript] Add custom variants, colors #858

Closed
theguriev opened this issue Oct 24, 2023 · 7 comments · Fixed by #863
Closed

[TypeScript] Add custom variants, colors #858

theguriev opened this issue Oct 24, 2023 · 7 comments · Fixed by #863
Labels
enhancement New feature or request

Comments

@theguriev
Copy link

Description

How to add variants so that types are taken into account and it works correctly in app.config.ts?

I'm trying to do something like that #725 (comment)

But unfortunately types is just not working.
image
image
Moreover I was trying to add something like that but it's also not working.
image
Looks like AppConfigInput will be overwritten by the module types. So how to extend it?

Additional context

Vue Tailwind implements such a feature (see https://www.vue-tailwind.com/docs/theming#variants).

@theguriev theguriev added the enhancement New feature or request label Oct 24, 2023
Copy link
Member

@theguriev What you wrote should work fine when using the <UButton> component, there was indeed a type issue in the app.config.ts.

Copy link
Member

There was indeed another issue that I completely forgot about when implementing #692, the user AppConfig was not taken into account in the prop types of the components, I finally found a way to achieve this! Thanks for the reminder 😊

@theguriev
Copy link
Author

@benjamincanac Nice! Thank you! :)

Copy link
Member

@theguriev Had to revert my commit into #863 (comment)

@metkm
Copy link

metkm commented Nov 10, 2023

This would be such a cool feature!

Copy link
Member

Should be working now 😊

@theguriev
Copy link
Author

theguriev commented Nov 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants