Skip to content

Commit eee312a

Browse files
authored
fix(menu item): correct typing for onClick (#325)
1 parent 6d01125 commit eee312a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Menu/MenuItem.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import React, {
1515
SVGAttributes,
1616
useCallback,
1717
useContext,
18+
MouseEventHandler,
1819
} from "react";
1920
import styles from "./MenuItem.module.css";
2021
import { Text } from "../Typography/Text";
@@ -59,7 +60,7 @@ type Props<C extends MenuItemElement> = {
5960
* Event callback for when the item is clicked.
6061
* @param e
6162
*/
62-
onClick?: (e: Event) => void;
63+
onClick?: MouseEventHandler<C>;
6364
/**
6465
* The color variant of the menu item.
6566
* @default primary

0 commit comments

Comments
 (0)