primevue
Version:
PrimeVue is a premium UI library for Vue featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, wh
74 lines (68 loc) • 1.83 kB
JavaScript
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue';
import BaseComponent from '@primevue/core/basecomponent';
import SidebarMenuActionStyle from 'primevue/sidebarmenuaction/style';
var script$1 = {
name: 'BaseSidebarMenuAction',
"extends": BaseComponent,
props: {
showOnHover: {
type: Boolean,
"default": false
},
as: {
type: [String, Object],
"default": 'BUTTON'
},
asChild: {
type: Boolean,
"default": false
}
},
style: SidebarMenuActionStyle,
provide: function provide() {
return {
$pcSidebarMenuAction: this,
$parentInstance: this
};
}
};
var script = {
name: 'SidebarMenuAction',
"extends": script$1,
inheritAttrs: false,
inject: {
$pcSidebar: {
"default": null
}
},
computed: {
a11yAttrs: function a11yAttrs() {
return {
'data-pc-name': 'sidebarmenuaction',
'data-pc-section': 'root',
'data-show-on-hover': this.showOnHover ? '' : undefined
};
},
attrs: function attrs() {
return mergeProps(this.a11yAttrs, this.ptmi('root'));
}
}
};
function render(_ctx, _cache, $props, $setup, $data, $options) {
return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({
key: 0,
"class": _ctx.cx('root'),
type: _ctx.as === 'BUTTON' || _ctx.as === 'button' ? 'button' : undefined
}, $options.attrs), {
"default": withCtx(function () {
return [renderSlot(_ctx.$slots, "default")];
}),
_: 3
}, 16, ["class", "type"])) : renderSlot(_ctx.$slots, "default", {
key: 1,
a11yAttrs: $options.a11yAttrs,
"class": normalizeClass(_ctx.cx('root'))
});
}
script.render = render;
export { script as default };