Skip to content

Commit 6ad57d4

Browse files
authored
Merge pull request #2332 from dxc-technology/Mil4n0r/fix_routing_problem
Fixed ItemAction type to work along with all next router
2 parents 7d702ea + 65dd77f commit 6ad57d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/lib/src/base-menu/ItemAction.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import DxcIcon from "../icon/Icon";
55
import { TooltipWrapper } from "../tooltip/Tooltip";
66
import { useItemAction } from "./useItemAction";
77

8-
const Action = styled.button<{
8+
const Action = styled.a<{
99
depthLevel: ItemActionProps["depthLevel"];
1010
selected: ItemActionProps["selected"];
1111
displayGroupLines: boolean;
@@ -79,7 +79,7 @@ const Control = styled.span`
7979
`;
8080

8181
const ItemAction = memo(
82-
forwardRef<HTMLButtonElement, ItemActionProps>((props, ref) => {
82+
forwardRef<HTMLAnchorElement, ItemActionProps>((props, ref) => {
8383
const {
8484
hasTooltip,
8585
modifiedBadge,

packages/lib/src/base-menu/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type MenuItemProps = {
6161
item: ItemWithId | GroupItemWithId;
6262
depthLevel?: number;
6363
};
64-
type ItemActionProps = ButtonHTMLAttributes<HTMLButtonElement> & {
64+
type ItemActionProps = ButtonHTMLAttributes<HTMLAnchorElement> & {
6565
badge?: Item["badge"];
6666
collapseIcon?: ReactNode;
6767
depthLevel: number;

0 commit comments

Comments
 (0)