diff --git a/packages/components/src/components/modal/modal.tsx b/packages/components/src/components/modal/modal.tsx index 05385f5413a7..1aee5dac3ad5 100644 --- a/packages/components/src/components/modal/modal.tsx +++ b/packages/components/src/components/modal/modal.tsx @@ -89,7 +89,7 @@ const ModalElement = ({ ); }; - const closeModal = (e: IClickEvent) => { + const closeModal = () => { if (is_open) toggleModal?.(); }; diff --git a/packages/components/src/hooks/use-onclickoutside.ts b/packages/components/src/hooks/use-onclickoutside.ts index 6a8125d8ebee..8cf8d6726c6c 100644 --- a/packages/components/src/hooks/use-onclickoutside.ts +++ b/packages/components/src/hooks/use-onclickoutside.ts @@ -6,7 +6,7 @@ export interface IClickEvent extends MouseEvent { export const useOnClickOutside = ( ref: RefObject, - handler: (event: IClickEvent) => void, + handler: (event?: IClickEvent) => void, validationFn: (event: IClickEvent) => boolean ) => { React.useEffect(() => {