@nextcloud/vue
Version:
Nextcloud vue components
51 lines (50 loc) • 1.57 kB
JavaScript
require('../assets/NcActionButtonGroup-CQxLn2fv.css');
"use strict";
const Vue = require("vue");
const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
const _l10n = require("./_l10n-Ci9_UR5q.cjs");
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
_l10n.register();
const _sfc_main = Vue.defineComponent({
name: "NcActionButtonGroup",
inject: {
isInSemanticMenu: {
from: "NcActions:isSemanticMenu",
default: false
}
},
props: {
/**
* Optional text shown below the button group
*/
name: {
required: false,
default: void 0,
type: String
}
},
setup() {
return {
labelId: "nc-action-button-group-".concat(GenRandomId.GenRandomId())
};
},
methods: {
t: _l10n.t
}
});
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
_vm._self._setupProxy;
return _c("li", { staticClass: "nc-button-group-base", attrs: { "role": _vm.isInSemanticMenu && "presentation" } }, [_vm.name ? _c("div", { attrs: { "id": _vm.labelId } }, [_vm._v(" " + _vm._s(_vm.name) + " ")]) : _vm._e(), _c("ul", { staticClass: "nc-button-group-content", attrs: { "role": "group", "aria-labelledby": _vm.name ? _vm.labelId : void 0 } }, [_vm._t("default")], 2)]);
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns,
false,
null,
null
);
const NcActionButtonGroup = __component__.exports;
exports.NcActionButtonGroup = NcActionButtonGroup;