Skip to content

Commit

Permalink
Fixed #4379 - Menu components: RouterBindProps typing
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Sep 4, 2023
1 parent e895b78 commit 411d62d
Show file tree
Hide file tree
Showing 10 changed files with 206 additions and 10 deletions.
20 changes: 19 additions & 1 deletion components/lib/breadcrumb/Breadcrumb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ export interface BreadcrumbContext {
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.
*/
Expand Down Expand Up @@ -145,7 +163,7 @@ export interface BreadcrumbSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: BreadcrumbRouterBindProps;
}): VNode[];
/**
* Custom separator template.
Expand Down
24 changes: 23 additions & 1 deletion components/lib/contextmenu/ContextMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,28 @@ export interface ContextMenuContext {
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.
*/
Expand Down Expand Up @@ -244,7 +266,7 @@ export interface ContextMenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: ContextMenuRouterBindProps;
}): VNode[];
/**
* Custom item icon template.
Expand Down
16 changes: 15 additions & 1 deletion components/lib/dock/Dock.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ export interface DockTooltipOptions {
[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.
*/
Expand Down Expand Up @@ -217,7 +231,7 @@ export interface DockSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: DockRouterBindProps;
}): VNode[];
/**
* Custom icon content.
Expand Down
24 changes: 23 additions & 1 deletion components/lib/megamenu/MegaMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,28 @@ export interface MegaMenuContext {
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.
*/
Expand Down Expand Up @@ -249,7 +271,7 @@ export interface MegaMenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: MegaMenuRouterBindProps;
/**
* Whether or not there is a submenu
*/
Expand Down
20 changes: 19 additions & 1 deletion components/lib/menu/Menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,24 @@ export interface MenuContext {
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.
*/
Expand Down Expand Up @@ -225,7 +243,7 @@ export interface MenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: MenuRouterBindProps;
}): VNode[];
/**
* Custom item icon template.
Expand Down
24 changes: 23 additions & 1 deletion components/lib/menubar/Menubar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,28 @@ export interface MenubarContext {
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.
*/
Expand Down Expand Up @@ -240,7 +262,7 @@ export interface MenubarSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: MenubarRouterBindProps;
/**
* State of the root
*/
Expand Down
24 changes: 23 additions & 1 deletion components/lib/panelmenu/PanelMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,28 @@ export interface 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.
*/
Expand Down Expand Up @@ -245,7 +267,7 @@ export interface PanelMenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: PanelMenuRouterBindProps;
/**
* Whether or not there is a submenu
*/
Expand Down
20 changes: 19 additions & 1 deletion components/lib/steps/Steps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ export interface StepsContext {
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.
*/
Expand Down Expand Up @@ -148,7 +166,7 @@ export interface StepsSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: StepsRouterBindProps;
}): VNode[];
}

Expand Down
20 changes: 19 additions & 1 deletion components/lib/tabmenu/TabMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ export interface TabMenuChangeEvent {
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.
*/
Expand Down Expand Up @@ -169,7 +187,7 @@ export interface TabMenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: TabMenuRouterBindProps;
}): VNode[];
/**
* Custom item icon template.
Expand Down
24 changes: 23 additions & 1 deletion components/lib/tieredmenu/TieredMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,28 @@ export interface TieredMenuContext {
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.
*/
Expand Down Expand Up @@ -243,7 +265,7 @@ export interface TieredMenuSlots {
/**
* Binding properties of the menuitem
*/
props: (...args: any) => string;
props: TabMenuRouterBindProps;
/**
* Whether or not there is a submenu
*/
Expand Down

0 comments on commit 411d62d

Please sign in to comment.