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; box-sizing: border-box;
font-weight: normal; font-weight: normal;
font-family: inherit; font-family: inherit;
justify-content: start; justify-content: flex-start;
} }
.dropdown-menu-item { .dropdown-menu-item {

View File

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