@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/).
55 lines (54 loc) • 2.03 kB
JavaScript
import '../mt-loader.css';
;
const vue = require("vue");
const _pluginVue_exportHelper = require("../_plugin-vue_export-helper-9c783a34.js");
const _hoisted_1 = { class: "mt-loader" };
const _hoisted_2 = { class: "mt-loader-element" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "mt-loader",
props: {
size: { default: "50px" }
},
setup(__props) {
const props = __props;
const borderWidth = vue.computed(() => {
const numericSize = Number(props.size.replace("px", ""));
let calculatedWidth;
if (numericSize <= 16) {
calculatedWidth = numericSize / 6;
} else if (numericSize <= 32) {
calculatedWidth = numericSize / 8;
} else {
calculatedWidth = numericSize / 12;
}
return `${calculatedWidth}px`;
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createElementVNode("div", {
class: "mt-loader__container",
style: vue.normalizeStyle({ width: _ctx.size, height: _ctx.size })
}, [
vue.createElementVNode("div", _hoisted_2, [
vue.createElementVNode("div", {
style: vue.normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
vue.createElementVNode("div", {
style: vue.normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
vue.createElementVNode("div", {
style: vue.normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
vue.createElementVNode("div", {
style: vue.normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4)
])
], 4)
]);
};
}
});
const mtLoader_vue_vue_type_style_index_0_scoped_e2f239e2_lang = "";
const MtLoader = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-e2f239e2"]]);
module.exports = MtLoader;
//# sourceMappingURL=MtLoader.js.map