primevue-mirror/components/lib/menubar/Menubar.d.ts

122 lines
2.6 KiB
TypeScript
Raw Normal View History

2023-03-01 13:04:25 +00:00
/**
*
* Menubar is a horizontal menu component.
*
* [Live Demo](https://www.primevue.org/menubar/)
*
* @module menubar
*
*/
2022-12-08 11:04:25 +00:00
import { ButtonHTMLAttributes, VNode } from 'vue';
2022-09-06 12:03:37 +00:00
import { MenuItem } from '../menuitem';
2022-12-08 11:04:25 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2022-09-06 12:03:37 +00:00
2023-03-01 13:04:25 +00:00
/**
* Defines valid properties in Menubar component.
*/
2022-09-06 12:03:37 +00:00
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.
2023-03-01 13:04:25 +00:00
* @defaultValue true
2022-09-06 12:03:37 +00:00
*/
exact?: boolean | undefined;
2022-12-08 11:04:25 +00:00
/**
* 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;
2022-09-06 12:03:37 +00:00
}
2023-03-01 13:04:25 +00:00
/**
* Defines valid slots in Menubar component.
*/
2022-09-06 12:03:37 +00:00
export interface MenubarSlots {
/**
* Custom start template.
*/
2023-03-01 13:04:25 +00:00
start(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom end template.
*/
2023-03-01 13:04:25 +00:00
end(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom item template.
* @param {Object} scope - item slot's params.
*/
2023-03-01 13:04:25 +00:00
item(scope: {
2022-09-06 12:03:37 +00:00
/**
* Menuitem instance
*/
item: MenuItem;
2023-03-01 13:04:25 +00:00
}): VNode[];
/**
* Custom bar icon template.
*/
baricon(): VNode[];
/**
* Custom submenu icon template.
*/
submenuicon(scope: {
/**
* Whether item is root
*/
root: boolean;
/**
* Whether item is active
*/
active: boolean;
}): VNode[];
/**
* Custom item icon template.
* @param {Object} scope - item icon slot's params.
*/
itemicon(scope: {
/**
* Menuitem instance
*/
item: MenuItem;
/**
* Style class of the item icon element.
*/
class: any;
}): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-03-01 13:04:25 +00:00
/**
* Defines valid emits in Menubar component.
*/
export interface MenubarEmits {}
2022-09-06 12:03:37 +00:00
2023-03-01 13:04:25 +00:00
/**
* **PrimeVue - Menubar**
*
* _Menubar is a horizontal menu component._
*
* [Live Demo](https://www.primevue.org/menubar/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-03-01 13:04:25 +00:00
*
* @group Component
*
*/
2022-09-14 11:26:01 +00:00
declare class Menubar extends ClassComponent<MenubarProps, MenubarSlots, MenubarEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Menubar: GlobalComponentConstructor<Menubar>;
2022-09-06 12:03:37 +00:00
}
}
export default Menubar;