@nextcloud/vue
Version:
Nextcloud vue components
58 lines (57 loc) • 2.06 kB
JavaScript
import '../assets/NcLoadingIcon-CWUlo4XY.css';
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, toDisplayString } from "vue";
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
const _hoisted_1 = ["aria-label"];
const _hoisted_2 = ["width", "height"];
const _hoisted_3 = ["fill"];
const _hoisted_4 = ["fill"];
const _hoisted_5 = { key: 0 };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "NcLoadingIcon",
props: {
appearance: { default: "auto" },
name: { default: "" },
size: { default: 20 }
},
setup(__props) {
const props = __props;
const colors = computed(() => {
const colors2 = ["#777", "#CCC"];
if (props.appearance === "light") {
return colors2;
} else if (props.appearance === "dark") {
return colors2.reverse();
}
return ["var(--color-loading-light)", "var(--color-loading-dark)"];
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
"aria-label": _ctx.name,
role: "img",
class: "material-design-icon loading-icon"
}, [
(openBlock(), createElementBlock("svg", {
width: _ctx.size,
height: _ctx.size,
viewBox: "0 0 24 24"
}, [
createElementVNode("path", {
fill: colors.value[0],
d: "M12,4V2A10,10 0 1,0 22,12H20A8,8 0 1,1 12,4Z"
}, null, 8, _hoisted_3),
createElementVNode("path", {
fill: colors.value[1],
d: "M12,4V2A10,10 0 0,1 22,12H20A8,8 0 0,0 12,4Z"
}, [
_ctx.name ? (openBlock(), createElementBlock("title", _hoisted_5, toDisplayString(_ctx.name), 1)) : createCommentVNode("", true)
], 8, _hoisted_4)
], 8, _hoisted_2))
], 8, _hoisted_1);
};
}
});
const NcLoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cf399190"]]);
export {
NcLoadingIcon as N
};
//# sourceMappingURL=NcLoadingIcon-b_ajZ_nQ.mjs.map