From d25deafa361d5fefb6e512be74a0dabc17ff4bc4 Mon Sep 17 00:00:00 2001 From: LoayTarek5 <142718879+LoayTarek5@users.noreply.github.com> Date: Sun, 3 Nov 2024 10:45:17 +0200 Subject: [PATCH] docs: convert useListenFocusTriggers stories file to TS (#2492) Co-authored-by: Yossi Saadi --- ...gers.stories.js => useListenFocusTriggers.stories.tsx} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename packages/core/src/hooks/useListenFocusTriggers/__stories__/{useListenFocusTriggers.stories.js => useListenFocusTriggers.stories.tsx} (73%) diff --git a/packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.js b/packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.tsx similarity index 73% rename from packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.js rename to packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.tsx index 55683f3d41..d76df9c08f 100644 --- a/packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.js +++ b/packages/core/src/hooks/useListenFocusTriggers/__stories__/useListenFocusTriggers.stories.tsx @@ -9,14 +9,14 @@ export default { export const Overview = { render: () => { - const [text, setText] = useState("-"); - const ref = useRef(null); + const [text, setText] = useState("-"); + const ref = useRef(null); - const onFocusByMouse = useCallback(_event => { + const onFocusByMouse = useCallback((_event: React.FocusEvent) => { setText("mouse"); }, []); - const onFocusByKeyboard = useCallback(_event => { + const onFocusByKeyboard = useCallback((_event: React.FocusEvent) => { setText("keyboard"); }, []);