I wonder why CVA when we can bind classes as arrays and objects and mixed? I use clsx with React, but nothing in Vue.
@cdruc2 жыл бұрын
objects & arrays are fine, I just find cva to be more readable - even more so when dealing with multiple props/variants
@codedjango2 жыл бұрын
We want more components....at the moment I see only this component on variantui
@matheusdesousamenezes514 Жыл бұрын
Really nice! One question: Is it safe in terms of performance to declare those cva classes as computed properties? On the examples that i saw on the docs, these were declared on the defineProps function, not as computed
@cdruc Жыл бұрын
Yes, it's safe. But if you don't want/need classes to be "recalculated" (I do) when the props change, just use a function like in the library example 👍
@ValentinTzanev2 жыл бұрын
Is there a good reason to use function as a prop instead of the custom event for dismiss?
@dvlden2 жыл бұрын
I think the best practise in Vue is to always use Event emitting.
@cdruc2 жыл бұрын
there's good reason, can you guess why? 😃
@ValentinTzanev2 жыл бұрын
@@cdruc Still wonder! :)
@СергейКиршевский Жыл бұрын
@@cdruc i think that this way it will be easier to rewrite close button to a slot