From 8e5db754805d72e7b09efd025631e578f7fed739 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 13 Dec 2023 14:59:43 -0500 Subject: [PATCH] Change types some more for React 17 compatibility --- src/components/Menu/DrawerMenu.tsx | 2 +- src/components/Menu/FloatingMenu.tsx | 2 +- src/components/Menu/MenuItem.tsx | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/Menu/DrawerMenu.tsx b/src/components/Menu/DrawerMenu.tsx index db6276a7..dc56b6e3 100644 --- a/src/components/Menu/DrawerMenu.tsx +++ b/src/components/Menu/DrawerMenu.tsx @@ -36,7 +36,7 @@ interface Props extends ComponentPropsWithoutRef<"div"> { // This an internal component not intended for export! Consumers should use it // via the Menu or ContextMenu components. export const DrawerMenu = forwardRef( - ({ title, children, className, ...props }, ref): ReactNode => ( + ({ title, children, className, ...props }, ref) => (
{ // This an internal component not intended for export! Consumers should use it // via the Menu or ContextMenu components. export const FloatingMenu = forwardRef( - ({ title, className, children, ...props }, ref): ReactNode => { + ({ title, className, children, ...props }, ref) => { const titleId = useId(); return (
({ onClick: onClickProp, disabled, ...props -}: Props): Exclude => { +}: Props): JSX.Element => { const Component = as ?? ("button" as ElementType); const context = useContext(MenuContext);