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

2 lines (1 loc) 1.44 kB
this.primevue=this.primevue||{},this.primevue.tag=function(e){"use strict";var t={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 n={class:"p-tag-value"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&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"),t.render=function(t,s,a,i,r,o){return e.openBlock(),e.createElementBlock("span",e.mergeProps({class:o.containerClass},t.$attrs),[a.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(o.iconClass)},null,2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("span",n,e.toDisplayString(a.value),1)]))],16)},t}(Vue);