UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

44 lines (38 loc) 1.43 kB
this.primevue = this.primevue || {}; this.primevue.badge = (function (vue) { 'use strict'; var script = { name: 'Badge', props: { value: null, severity: null, size: null }, computed: { containerClass() { return this.$slots.default ? 'p-overlay-badge': this.badgeClass; }, badgeClass() { return ['p-badge p-component', { 'p-badge-no-gutter': this.value && String(this.value).length === 1, 'p-badge-dot': !this.value && !this.$slots.default, 'p-badge-lg': this.size === 'large', 'p-badge-xl': this.size === 'xlarge', 'p-badge-info': this.severity === 'info', 'p-badge-success': this.severity === 'success', 'p-badge-warning': this.severity === 'warning', 'p-badge-danger': this.severity === 'danger' }]; } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return (vue.openBlock(), vue.createBlock("span", { class: $options.badgeClass }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createTextVNode(vue.toDisplayString($props.value), 1) ]) ], 2)) } script.render = render; return script; }(Vue));