Closed Fsss126 closed 5 months ago
Multiple presets can be applied to component by passing an array, support for passing a string as it was before remains
<VaButton :preset="['addToCart', 'promotion']" />
createVuestic({ components: { presets: { VaButton: { addToCart: { round: true, color: 'success', icon: 'shopping_cart', 'slot:default': 'Add to card' }, promotion: { gradient: true, color: 'primary' } }, }, }, })
Presets can extend each other - if one preset specifies preset prop they will be recursively applied. This code will produce the same as above
createVuestic({ components: { presets: { VaButton: { addToCart: { round: true, color: 'success', icon: 'shopping_cart', 'slot:default': 'Add to card' }, promotion: { preset: 'addToCart', gradient: true, color: 'primary' } }, }, }, })
<VaButton preset="promotion" />
Extending multiple presets is also supported.
What was done
Description
Multiple presets can be applied to component by passing an array, support for passing a string as it was before remains
Presets can extend each other - if one preset specifies preset prop they will be recursively applied. This code will produce the same as above
Extending multiple presets is also supported.
Types of changes