@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/).
56 lines (55 loc) • 2.02 kB
JavaScript
import '../mt-loader.css';
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle } from "vue";
import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.mjs";
const _hoisted_1 = { class: "mt-loader" };
const _hoisted_2 = { class: "mt-loader-element" };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "mt-loader",
props: {
size: { default: "50px" }
},
setup(__props) {
const props = __props;
const borderWidth = 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 openBlock(), createElementBlock("div", _hoisted_1, [
createElementVNode("div", {
class: "mt-loader__container",
style: normalizeStyle({ width: _ctx.size, height: _ctx.size })
}, [
createElementVNode("div", _hoisted_2, [
createElementVNode("div", {
style: normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
createElementVNode("div", {
style: normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
createElementVNode("div", {
style: normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4),
createElementVNode("div", {
style: normalizeStyle({ borderWidth: borderWidth.value })
}, null, 4)
])
], 4)
]);
};
}
});
const mtLoader_vue_vue_type_style_index_0_scoped_e2f239e2_lang = "";
const MtLoader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e2f239e2"]]);
export {
MtLoader as default
};
//# sourceMappingURL=MtLoader.js.map