UNPKG

@shopware-ag/meteor-component-library

Version:

The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).

59 lines (58 loc) 1.55 kB
import '../mt-color-badge.css'; "use strict"; const vue = require("vue"); const _pluginVue_exportHelper = require("../_plugin-vue_export-helper-9c783a34.js"); const _sfc_main = vue.defineComponent({ name: "MtColorBadge", props: { variant: { type: String, required: false, default: "default", validator(value) { return ["default", "warning", "critical", "positive", "info"].includes(value); } }, color: { type: String, required: false, default: "" }, rounded: { type: Boolean, required: false, default: false }, hasText: { type: Boolean, required: false, default: false } }, computed: { colorStyle() { if (!this.color.length) { return ""; } return `background:${this.color}`; }, variantClass() { return { [`is--${this.variant}`]: true, "is--rounded": this.rounded, "has--text": this.hasText }; } } }); const mtColorBadge_vue_vue_type_style_index_0_lang = ""; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({ class: ["mt-color-badge", _ctx.variantClass] }, _ctx.$attrs, { style: _ctx.colorStyle }), [ vue.renderSlot(_ctx.$slots, "default") ], 16); } const MtColorBadge = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]); module.exports = MtColorBadge; //# sourceMappingURL=MtColorBadge.js.map