@nextcloud/vue
Version:
Nextcloud vue components
73 lines (72 loc) • 1.99 kB
JavaScript
import '../assets/NcAppNavigationNew-Bn8zj5lM.css';
import { N as NcButton } from "./NcButton-Dc8V4Urj.mjs";
import { resolveComponent, createElementBlock, openBlock, createVNode, withCtx, createTextVNode, toDisplayString, renderSlot } from "vue";
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
const _sfc_main = {
components: {
NcButton
},
props: {
/**
* Id of the button
*/
buttonId: {
type: String,
required: false,
default: ""
},
/**
* Disabled state of the button
*/
disabled: {
type: Boolean,
required: false,
default: false
},
/**
* Main text of the button
*/
text: {
type: String,
required: true
},
/**
* The color variant to use.
*
* @default 'primary'
*/
variant: {
type: String,
default: "primary",
validator(value) {
return ["primary", "secondary", "tertiary"].indexOf(value) !== -1;
}
}
},
emits: ["click"]
};
const _hoisted_1 = { class: "app-navigation-new" };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_NcButton = resolveComponent("NcButton");
return openBlock(), createElementBlock("div", _hoisted_1, [
createVNode(_component_NcButton, {
id: $props.buttonId,
disabled: $props.disabled,
variant: $props.variant,
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
}, {
icon: withCtx(() => [
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
]),
default: withCtx(() => [
createTextVNode(" " + toDisplayString($props.text), 1)
]),
_: 3
}, 8, ["id", "disabled", "variant"])
]);
}
const NcAppNavigationNew = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0ba6c9df"]]);
export {
NcAppNavigationNew as N
};
//# sourceMappingURL=NcAppNavigationNew-CuwqNksa.mjs.map