UNPKG

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.84 kB
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import SidebarMenuSubButtonStyle from 'primevue/sidebarmenusubbutton/style'; var script$1 = { name: 'BaseSidebarMenuSubButton', "extends": BaseComponent, props: { isActive: { type: Boolean, "default": false }, as: { type: [String, Object], "default": 'BUTTON' }, asChild: { type: Boolean, "default": false } }, style: SidebarMenuSubButtonStyle, provide: function provide() { return { $pcSidebarMenuSubButton: this, $parentInstance: this }; } }; var script = { name: 'SidebarMenuSubButton', "extends": script$1, inheritAttrs: false, inject: { $pcSidebar: { "default": null } }, computed: { a11yAttrs: function a11yAttrs() { return { 'data-pc-name': 'sidebarmenusubbutton', 'data-pc-section': 'root', 'data-active': this.isActive ? 'true' : 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 };