Fixed #4379 - Menu components: RouterBindProps typing

pull/4142/head
Tuğçe Küçükoğlu 2023-09-04 12:16:03 +03:00
parent e895b78e99
commit 411d62df2c
10 changed files with 206 additions and 10 deletions

View File

@ -88,6 +88,24 @@ export interface BreadcrumbContext {
index: number; index: number;
} }
/**
* Defines valid router binding props in Breadcrumb component.
*/
export interface BreadcrumbRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
}
/** /**
* Defines valid properties in Breadcrumb component. * Defines valid properties in Breadcrumb component.
*/ */
@ -145,7 +163,7 @@ export interface BreadcrumbSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: BreadcrumbRouterBindProps;
}): VNode[]; }): VNode[];
/** /**
* Custom separator template. * Custom separator template.

View File

@ -167,6 +167,28 @@ export interface ContextMenuContext {
focused: boolean; focused: boolean;
} }
/**
* Defines valid router binding props in ContextMenu component.
*/
export interface ContextMenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
/**
* Submenuicon elemnt binding
*/
submenuicon: object;
}
/** /**
* Defines valid properties in ContextMenu component. * Defines valid properties in ContextMenu component.
*/ */
@ -244,7 +266,7 @@ export interface ContextMenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: ContextMenuRouterBindProps;
}): VNode[]; }): VNode[];
/** /**
* Custom item icon template. * Custom item icon template.

View File

@ -134,6 +134,20 @@ export interface DockTooltipOptions {
[key: string]: any; [key: string]: any;
} }
/**
* Defines valid router binding props in Dock component.
*/
export interface DockRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
}
/** /**
* Defines valid properties in Dock component. * Defines valid properties in Dock component.
*/ */
@ -217,7 +231,7 @@ export interface DockSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: DockRouterBindProps;
}): VNode[]; }): VNode[];
/** /**
* Custom icon content. * Custom icon content.

View File

@ -174,6 +174,28 @@ export interface MegaMenuContext {
focused: boolean; focused: boolean;
} }
/**
* Defines valid router binding props in MegaMenu component.
*/
export interface MegaMenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
/**
* Submenuicon elemnt binding
*/
submenuicon: object;
}
/** /**
* Defines valid properties in MegaMenu component. * Defines valid properties in MegaMenu component.
*/ */
@ -249,7 +271,7 @@ export interface MegaMenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: MegaMenuRouterBindProps;
/** /**
* Whether or not there is a submenu * Whether or not there is a submenu
*/ */

View File

@ -140,6 +140,24 @@ export interface MenuContext {
focused: boolean; focused: boolean;
} }
/**
* Defines valid router binding props in Menu component.
*/
export interface MenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
}
/** /**
* Defines valid properties in Menu component. * Defines valid properties in Menu component.
*/ */
@ -225,7 +243,7 @@ export interface MenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: MenuRouterBindProps;
}): VNode[]; }): VNode[];
/** /**
* Custom item icon template. * Custom item icon template.

View File

@ -175,6 +175,28 @@ export interface MenubarContext {
level: number; level: number;
} }
/**
* Defines valid router binding props in Menubar component.
*/
export interface MenubarRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
/**
* Submenuicon elemnt binding
*/
submenuicon: object;
}
/** /**
* Defines valid properties in Menubar component. * Defines valid properties in Menubar component.
*/ */
@ -240,7 +262,7 @@ export interface MenubarSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: MenubarRouterBindProps;
/** /**
* State of the root * State of the root
*/ */

View File

@ -191,6 +191,28 @@ export interface PanelMenuPanelOpenEvent {
*/ */
export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {} export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {}
/**
* Defines valid router binding props in PanelMenu component.
*/
export interface PanelMenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
/**
* Submenuicon elemnt binding
*/
submenuicon: object;
}
/** /**
* Defines valid properties in PanelMenu component. * Defines valid properties in PanelMenu component.
*/ */
@ -245,7 +267,7 @@ export interface PanelMenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: PanelMenuRouterBindProps;
/** /**
* Whether or not there is a submenu * Whether or not there is a submenu
*/ */

View File

@ -90,6 +90,24 @@ export interface StepsContext {
disabled: boolean; disabled: boolean;
} }
/**
* Defines valid router binding props in Steps component.
*/
export interface StepsRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
}
/** /**
* Defines valid properties in Steps component. * Defines valid properties in Steps component.
*/ */
@ -148,7 +166,7 @@ export interface StepsSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: StepsRouterBindProps;
}): VNode[]; }): VNode[];
} }

View File

@ -111,6 +111,24 @@ export interface TabMenuChangeEvent {
index: number; index: number;
} }
/**
* Defines valid router binding props in TabMenu component.
*/
export interface TabMenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
}
/** /**
* Defines valid properties in TabMenu component. * Defines valid properties in TabMenu component.
*/ */
@ -169,7 +187,7 @@ export interface TabMenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: TabMenuRouterBindProps;
}): VNode[]; }): VNode[];
/** /**
* Custom item icon template. * Custom item icon template.

View File

@ -161,6 +161,28 @@ export interface TieredMenuContext {
focused: boolean; focused: boolean;
} }
/**
* Defines valid router binding props in TabMenu component.
*/
export interface TabMenuRouterBindProps {
/**
* Action element binding
*/
action: object;
/**
* Icon element binding
*/
icon: object;
/**
* Label element binding
*/
label: object;
/**
* Submenuicon elemnt binding
*/
submenuicon: object;
}
/** /**
* Defines valid properties in TieredMenuMenu component. * Defines valid properties in TieredMenuMenu component.
*/ */
@ -243,7 +265,7 @@ export interface TieredMenuSlots {
/** /**
* Binding properties of the menuitem * Binding properties of the menuitem
*/ */
props: (...args: any) => string; props: TabMenuRouterBindProps;
/** /**
* Whether or not there is a submenu * Whether or not there is a submenu
*/ */