UNPKG

@nextcloud/vue

Version:
50 lines (49 loc) 1.89 kB
import '../assets/NcHeaderButton-CVOQgRjm.css'; import { defineComponent, createElementBlock, openBlock, createVNode, createCommentVNode, unref, withModifiers, withCtx, renderSlot, toDisplayString } from "vue"; import { c as createElementId } from "./createElementId-DhjFt1I9.mjs"; import { N as NcButton } from "./NcButton-Dc8V4Urj.mjs"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs"; const _hoisted_1 = ["id"]; const _hoisted_2 = ["id"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "NcHeaderButton", props: { id: {}, ariaLabel: {}, description: {} }, emits: ["click"], setup(__props) { const descriptionId = createElementId(); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { id: _ctx.id, class: "header-menu" }, [ createVNode(unref(NcButton), { "aria-label": _ctx.ariaLabel, "aria-describedby": unref(descriptionId), class: "header-menu__trigger", size: "large", variant: "tertiary-no-background", onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("click", $event), ["prevent"])) }, { icon: withCtx(() => [ renderSlot(_ctx.$slots, "icon", {}, void 0, true) ]), _: 3 }, 8, ["aria-label", "aria-describedby"]), _ctx.description ? (openBlock(), createElementBlock("span", { key: 0, id: unref(descriptionId), class: "header-menu__description hidden-visually" }, toDisplayString(_ctx.description), 9, _hoisted_2)) : createCommentVNode("", true) ], 8, _hoisted_1); }; } }); const NcHeaderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-92fb182d"]]); export { NcHeaderButton as N }; //# sourceMappingURL=NcHeaderButton-CA17OV7l.mjs.map