mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3907 - For TabMenu
This commit is contained in:
parent
5d40f1c45d
commit
09553cbcd3
3 changed files with 87 additions and 10 deletions
68
components/lib/tabmenu/TabMenu.d.ts
vendored
68
components/lib/tabmenu/TabMenu.d.ts
vendored
|
@ -11,6 +11,69 @@ import { VNode } from 'vue';
|
|||
import { MenuItem } from '../menuitem';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type TabMenuPassThroughOptionType = TabMenuPassThroughAttributes | ((options: TabMenuPassThroughMethodOptions) => TabMenuPassThroughAttributes) | null | undefined;
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) option method.
|
||||
*/
|
||||
export interface TabMenuPassThroughMethodOptions {
|
||||
props: TabMenuProps;
|
||||
state: TabMenuState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) options.
|
||||
* @see {@link TabMenuProps.pt}
|
||||
*/
|
||||
export interface TabMenuPassThroughOptions {
|
||||
/**
|
||||
* Uses to pass attributes to the root's DOM element.
|
||||
*/
|
||||
root?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the list's DOM element.
|
||||
*/
|
||||
menu?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the list item's DOM element.
|
||||
*/
|
||||
menuitem?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the action's DOM element.
|
||||
*/
|
||||
action?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the icon's DOM element.
|
||||
*/
|
||||
icon?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the label's DOM element.
|
||||
*/
|
||||
label?: TabMenuPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the inkbar's DOM element.
|
||||
*/
|
||||
inkbar?: TabMenuPassThroughOptionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough attributes for each DOM elements
|
||||
*/
|
||||
export interface TabMenuPassThroughAttributes {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines current inline state in TabMenu component.
|
||||
*/
|
||||
export interface TabMenuState {
|
||||
/**
|
||||
* Current active index state as a number.
|
||||
* @defaulValue 0
|
||||
*/
|
||||
d_activeIndex: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom change event.
|
||||
* @see {@link TabMenuEmits['tab-change']}
|
||||
|
@ -52,6 +115,11 @@ export interface TabMenuProps {
|
|||
* Identifier of the underlying input element.
|
||||
*/
|
||||
'aria-labelledby'?: string | undefined;
|
||||
/**
|
||||
* Uses to pass attributes to DOM elements inside the component.
|
||||
* @type {TabMenuPassThroughOptions}
|
||||
*/
|
||||
pt?: TabMenuPassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue