feat: Add consistent variant
prop for design variant of buttons / chips
#6472
+309
−133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@nextcloud/vue v9
breaking changes #6384 (comment)☑️ Resolves
Currently we need to wrap the native
type
prop of a button intonativeType
ofNcButton
.This is confusing and we should never use names for props that are already attributes of the native HTML element.
The solution is to rename
type
tovariant
.To not make it breaking following is applied:
variant
prop is added replacingtype
nativeType
is deprecated in favor oftype
type
allows both, the native button type and the color variantnativeType
The same is also applied for
NcDialogButton
andNcActions
.NcChip
also referred to theNcButton
for thetype
so this is also migrated the same way to make the wordingvariant
consistent.In a last step all components are refactored to use the new props instead.
🖼️ Screenshots
Nothing visually changed - if it does that's a regression 😨
🏁 Checklist
next
requested with a Vue 3 upgrade