UNPKG

@nextcloud/vue

Version:
48 lines (47 loc) 1.41 kB
import '../assets/NcAppNavigationIconBullet-DLQJkObX.css'; import { createElementBlock, openBlock, createElementVNode, normalizeStyle } from "vue"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs"; const _sfc_main = { name: "NcAppNavigationIconBullet", props: { /** * The color of the bullet point (as RGB HEX) */ color: { type: String, required: true, validator(color) { return /^#?([0-9A-F]{3}){1,2}$/i.test(color); } } }, emits: ["click"], computed: { formattedColor() { if (this.color.startsWith("#")) { return this.color; } return "#" + this.color; } }, methods: { onClick(e) { this.$emit("click", e); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { class: "app-navigation-entry__icon-bullet", onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) }, [ createElementVNode("div", { style: normalizeStyle({ backgroundColor: $options.formattedColor }) }, null, 4) ]); } const NcAppNavigationIconBullet = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-04a313f4"]]); export { NcAppNavigationIconBullet as N }; //# sourceMappingURL=NcAppNavigationIconBullet-PrlhOoE9.mjs.map