button => Button, cleanup

This commit is contained in:
barnabasmolnar 2023-07-26 13:01:41 +02:00
parent 2a1b22a504
commit d5974e66b2
2 changed files with 5 additions and 3 deletions

View File

@ -61,7 +61,7 @@
box-sizing: border-box;
font-weight: normal;
font-family: inherit;
justify-content: start;
justify-content: flex-start;
}
.dropdown-menu-item {

View File

@ -1,3 +1,4 @@
import { Button } from "../Button";
import MenuItemContent from "./DropdownMenuItemContent";
import {
getDropdownMenuItemClassName,
@ -24,9 +25,10 @@ const DropdownMenuSubItem = ({
return (
<DropdownMenuPrimitive.Item className="radix-menu-item">
<button
<Button
{...rest}
onClick={handleClick}
onSelect={() => {}}
type="button"
className={getDropdownMenuItemClassName(className)}
title={rest.title ?? rest["aria-label"]}
@ -34,7 +36,7 @@ const DropdownMenuSubItem = ({
<MenuItemContent icon={icon} shortcut={shortcut}>
{children}
</MenuItemContent>
</button>
</Button>
</DropdownMenuPrimitive.Item>
);
};