mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3907 - options have changed as context
This commit is contained in:
parent
6005b67be7
commit
5aab120fe5
16 changed files with 75 additions and 24 deletions
17
components/lib/panelmenu/PanelMenu.d.ts
vendored
17
components/lib/panelmenu/PanelMenu.d.ts
vendored
|
@ -19,6 +19,7 @@ export declare type PanelMenuPassThroughOptionType = PanelMenuPassThroughAttribu
|
|||
export interface PanelMenuPassThroughMethodOptions {
|
||||
props: PanelMenuProps;
|
||||
state: PanelMenuState;
|
||||
context: PanelMenuContext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,6 +123,22 @@ export interface PanelMenuState {
|
|||
activeItem: MenuItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines current options in PanelMenu component.
|
||||
*/
|
||||
export interface PanelMenuContext {
|
||||
/**
|
||||
* Current active state of menuitem as a boolean.
|
||||
* @defaultValue false
|
||||
*/
|
||||
active: boolean;
|
||||
/**
|
||||
* Current focused state of menuitem as a boolean.
|
||||
* @defaultValue false
|
||||
*/
|
||||
focused: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom expanded keys metadata.
|
||||
* @see {@link PanelMenuProps.expandedKeys}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue