Skip to content

Commit

Permalink
docs: convert useListenFocusTriggers stories file to TS (#2492)
Browse files Browse the repository at this point in the history
Co-authored-by: Yossi Saadi <[email protected]>
  • Loading branch information
LoayTarek5 and YossiSaadi authored Nov 3, 2024
1 parent ea8256e commit d25deaf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export default {

export const Overview = {
render: () => {
const [text, setText] = useState("-");
const ref = useRef(null);
const [text, setText] = useState<string>("-");
const ref = useRef<HTMLButtonElement>(null);

const onFocusByMouse = useCallback(_event => {
const onFocusByMouse = useCallback((_event: React.FocusEvent<HTMLButtonElement>) => {
setText("mouse");
}, []);

const onFocusByKeyboard = useCallback(_event => {
const onFocusByKeyboard = useCallback((_event: React.FocusEvent<HTMLButtonElement>) => {
setText("keyboard");
}, []);

Expand Down

0 comments on commit d25deaf

Please sign in to comment.