UNPKG

@nextcloud/vue

Version:
52 lines (51 loc) 2.37 kB
import '../assets/NcActionRouter-ByijfQtF.css'; import { A as ActionTextMixin } from "../chunks/actionText-BMig9Egt.mjs"; import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs"; const _sfc_main = { name: "NcActionRouter", mixins: [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__ */ normalizeComponent( _sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "bce2dceb" ); const NcActionRouter = __component__.exports; export { NcActionRouter as default }; //# sourceMappingURL=NcActionRouter.mjs.map