Refactor #3907 - options have changed as context

This commit is contained in:
Tuğçe Küçükoğlu 2023-04-28 13:15:44 +03:00
parent 6005b67be7
commit 5aab120fe5
16 changed files with 75 additions and 24 deletions

View file

@ -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}