UNPKG

@nextcloud/vue

Version:
51 lines (50 loc) 2.4 kB
require('../assets/NcActionRouter-ByijfQtF.css'); "use strict"; const actionText = require("../chunks/actionText-D2-z0ud3.cjs"); const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs"); const _sfc_main = { name: "NcActionRouter", mixins: [actionText.ActionTextMixin], inject: { isInSemanticMenu: { from: "NcActions:isSemanticMenu", default: false } }, props: { /** * router-link to prop [https://router.vuejs.org/api/#to](https://router.vuejs.org/api/#to) */ to: { type: [String, Object], required: true }, /** * router-link exact prop [https://router.vuejs.org/api/#exact](https://router.vuejs.org/api/#exact) */ exact: { type: Boolean, default: false } } }; var _sfc_render = function render() { var _vm = this, _c = _vm._self._c; return _c("li", { staticClass: "action", attrs: { "role": _vm.isInSemanticMenu && "presentation" } }, [_c("RouterLink", { staticClass: "action-router focusable", attrs: { "to": _vm.to, "aria-label": _vm.ariaLabel, "exact": _vm.exact, "title": _vm.title, "rel": "nofollow noreferrer noopener", "role": _vm.isInSemanticMenu && "menuitem" }, nativeOn: { "click": function($event) { return _vm.onClick.apply(null, arguments); } } }, [_vm._t("icon", function() { return [_c("span", { staticClass: "action-router__icon", class: [_vm.isIconUrl ? "action-router__icon--url" : _vm.icon], style: { backgroundImage: _vm.isIconUrl ? `url(${_vm.icon})` : null }, attrs: { "aria-hidden": "true" } })]; }), _vm.name ? _c("span", { staticClass: "action-router__longtext-wrapper" }, [_c("strong", { staticClass: "action-router__name" }, [_vm._v(" " + _vm._s(_vm.name) + " ")]), _c("br"), _c("span", { staticClass: "action-router__longtext", domProps: { "textContent": _vm._s(_vm.text) } })]) : _vm.isLongText ? _c("span", { staticClass: "action-router__longtext", domProps: { "textContent": _vm._s(_vm.text) } }) : _c("span", { staticClass: "action-router__text" }, [_vm._v(_vm._s(_vm.text))]), _vm._e()], 2)], 1); }; var _sfc_staticRenderFns = []; var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent( _sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "bce2dceb" ); const NcActionRouter = __component__.exports; module.exports = NcActionRouter; //# sourceMappingURL=NcActionRouter.cjs.map