@nextcloud/vue
Version:
Nextcloud vue components
64 lines (63 loc) • 1.92 kB
JavaScript
import { defineComponent } from "vue";
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
const _sfc_main = defineComponent({
name: "NcSavingIndicatorIcon",
props: {
/**
* Specify the size of the saving icon.
*/
size: {
type: Number,
default: 20
},
/**
* Specify what is saved.
*/
name: {
type: String,
default: ""
},
/**
* Set to true when saving is in progress.
*/
saving: {
type: Boolean,
default: false,
required: false
},
/**
* Set to true if an error occured while saving.
*/
error: {
type: Boolean,
default: false,
required: false
}
},
emits: ["click"],
computed: {
indicatorColor() {
return this.error ? "var(--color-error)" : this.saving ? "var(--color-primary-element)" : "none";
}
}
});
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
_vm._self._setupProxy;
return _c("span", { staticClass: "material-design-icon", attrs: { "aria-label": _vm.name, "role": "img" }, on: { "click": function($event) {
return _vm.$emit("click", $event);
} } }, [_c("svg", { staticClass: "material-design-icon__svg", attrs: { "fill": _vm.fillColor, "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "fill": _vm.indicatorColor, "d": "m19 15a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4z" } }), _c("path", { attrs: { "fill": "currentColor", "d": "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" } }, [_vm.name ? _c("title", [_vm._v(_vm._s(_vm.name))]) : _vm._e()])])]);
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ normalizeComponent(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns,
false,
null,
null
);
const NcSavingIndicatorIcon = __component__.exports;
export {
NcSavingIndicatorIcon as N
};