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.55 kB
"use strict";var e=require("vue"),n={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 t={class:"p-tag-value"};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-tag {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: 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"),n.render=function(n,i,a,s,r,o){return e.openBlock(),e.createBlock("span",{class:o.containerClass},[e.renderSlot(n.$slots,"default",{},(()=>[a.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.iconClass},null,2)):e.createCommentVNode("",!0),e.createVNode("span",t,e.toDisplayString(a.value),1)]))],2)},module.exports=n;