button => Button in dropdown

This commit is contained in:
barnabasmolnar 2023-07-25 15:48:37 +02:00
parent 8ff1ac8097
commit b3d241ba7f
2 changed files with 5 additions and 3 deletions

View File

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

View File

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