91 lines
2.0 KiB
TypeScript
91 lines
2.0 KiB
TypeScript
|
/**
|
||
|
*
|
||
|
* Menubar is a horizontal menu component.
|
||
|
*
|
||
|
* [Live Demo](https://www.primevue.org/menubar/)
|
||
|
*
|
||
|
* @module menubar
|
||
|
*
|
||
|
*/
|
||
|
import { ButtonHTMLAttributes, VNode } from 'vue';
|
||
|
import { MenuItem } from '../menuitem';
|
||
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||
|
|
||
|
/**
|
||
|
* Defines valid properties in Menubar component.
|
||
|
*/
|
||
|
export interface MenubarProps {
|
||
|
/**
|
||
|
* An array of menuitems.
|
||
|
*/
|
||
|
model?: MenuItem[] | undefined;
|
||
|
/**
|
||
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||
|
* @defaultValue true
|
||
|
*/
|
||
|
exact?: boolean | undefined;
|
||
|
/**
|
||
|
* Uses to pass all properties of the HTMLButtonElement to the menu button.
|
||
|
*/
|
||
|
buttonProps?: ButtonHTMLAttributes | undefined;
|
||
|
/**
|
||
|
* Defines a string value that labels an interactive element.
|
||
|
*/
|
||
|
'aria-label'?: string | undefined;
|
||
|
/**
|
||
|
* Identifier of the underlying input element.
|
||
|
*/
|
||
|
'aria-labelledby'?: string | undefined;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Defines valid slots in Menubar component.
|
||
|
*/
|
||
|
export interface MenubarSlots {
|
||
|
/**
|
||
|
* Custom start template.
|
||
|
*/
|
||
|
start(): VNode[];
|
||
|
/**
|
||
|
* Custom end template.
|
||
|
*/
|
||
|
end(): VNode[];
|
||
|
/**
|
||
|
* Custom item template.
|
||
|
* @param {Object} scope - item slot's params.
|
||
|
*/
|
||
|
item(scope: {
|
||
|
/**
|
||
|
* Menuitem instance
|
||
|
*/
|
||
|
item: MenuItem;
|
||
|
}): VNode[];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Defines valid emits in Menubar component.
|
||
|
*/
|
||
|
export interface MenubarEmits {}
|
||
|
|
||
|
/**
|
||
|
* **PrimeVue - Menubar**
|
||
|
*
|
||
|
* _Menubar is a horizontal menu component._
|
||
|
*
|
||
|
* [Live Demo](https://www.primevue.org/menubar/)
|
||
|
* --- ---
|
||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
||
|
*
|
||
|
* @group Component
|
||
|
*
|
||
|
*/
|
||
|
declare class Menubar extends ClassComponent<MenubarProps, MenubarSlots, MenubarEmits> {}
|
||
|
|
||
|
declare module '@vue/runtime-core' {
|
||
|
interface GlobalComponents {
|
||
|
Menubar: GlobalComponentConstructor<Menubar>;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default Menubar;
|