primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 1.49 kB
JavaScript
import{openBlock as e,createElementBlock as n,normalizeClass as t,createBlock as s,resolveDynamicComponent as a,createCommentVNode as i,renderSlot as o,createElementVNode as r,toDisplayString as c}from"vue";var l={name:"Tag",props:{value:null,severity:null,rounded:Boolean,icon:String},computed:{containerClass(){return["p-tag p-component",{"p-tag-info":"info"===this.severity,"p-tag-success":"success"===this.severity,"p-tag-warning":"warning"===this.severity,"p-tag-danger":"danger"===this.severity,"p-tag-rounded":this.rounded}]},iconClass(){return["p-tag-icon",this.icon]}}};const d={class:"p-tag-value"};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&s.firstChild?s.insertBefore(a,s.firstChild):s.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-tag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.p-tag-icon,\n.p-tag-value,\n.p-tag-icon.pi {\n line-height: 1.5;\n}\n.p-tag.p-tag-rounded {\n border-radius: 10rem;\n}\n"),l.render=function(l,p,u,g,h,f){return e(),n("span",{class:t(f.containerClass)},[l.$slots.icon?(e(),s(a(l.$slots.icon),{key:0,class:"p-tag-icon"})):u.icon?(e(),n("span",{key:1,class:t(f.iconClass)},null,2)):i("",!0),o(l.$slots,"default",{},(()=>[r("span",d,c(u.value),1)]))],2)};export{l as default};