From 9b83c410048387c4d190ab23c6cbe64277b0a627 Mon Sep 17 00:00:00 2001 From: ngorin Date: Wed, 13 Sep 2023 18:24:54 +0300 Subject: [PATCH] feat: add jsdoc for useOnClickOutside --- .../utils/useOnClickOutside/useOnClickOutside.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/utils/useOnClickOutside/useOnClickOutside.tsx b/src/components/utils/useOnClickOutside/useOnClickOutside.tsx index e3be395fcb..7bd9c3bc79 100644 --- a/src/components/utils/useOnClickOutside/useOnClickOutside.tsx +++ b/src/components/utils/useOnClickOutside/useOnClickOutside.tsx @@ -9,6 +9,15 @@ export type UseOnClickOutsideType = ({ handleCallback?: () => void; }) => void; +/** + * Hook for observing clicks outside a given target + * + * @param observedRef - purpose of observation + * @param enabled - enabled/disable flag + * @param handleCallback - callback when a click is triggered outside the observation target + * + * @return - nothing + */ export const useOnClickOutside: UseOnClickOutsideType = ({ observedRef, enabled = true,