Fixed #4863 - Button: new badgeSeverity property
parent
f12576ce8e
commit
70efc14382
|
@ -30,6 +30,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
badgeSeverity: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -116,6 +116,10 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
* Style class of the badge.
|
* Style class of the badge.
|
||||||
*/
|
*/
|
||||||
badgeClass?: string | undefined;
|
badgeClass?: string | undefined;
|
||||||
|
/**
|
||||||
|
* Severity type of the badge.
|
||||||
|
*/
|
||||||
|
badgeSeverity?: 'info' | 'success' | 'warning' | 'danger' | string | null | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether the button is in loading state.
|
* Whether the button is in loading state.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<span v-if="icon" :class="[cx('icon'), icon, iconClass]" v-bind="ptm('icon')"></span>
|
<span v-if="icon" :class="[cx('icon'), icon, iconClass]" v-bind="ptm('icon')"></span>
|
||||||
</slot>
|
</slot>
|
||||||
<span :class="cx('label')" v-bind="ptm('label')">{{ label || ' ' }}</span>
|
<span :class="cx('label')" v-bind="ptm('label')">{{ label || ' ' }}</span>
|
||||||
<Badge v-if="badge" :value="badge" :class="badgeClass" :unstyled="unstyled" v-bind="ptm('badge')"></Badge>
|
<Badge v-if="badge" :value="badge" :class="badgeClass" :severity="badgeSeverity" :unstyled="unstyled" v-bind="ptm('badge')"></Badge>
|
||||||
</slot>
|
</slot>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue