Skip to content

Commit

Permalink
add debug value to useIsFocusVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 1, 2020
1 parent beffaa4 commit 18a4214
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/material-ui/src/utils/focusVisible.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,10 @@ export function useIsFocusVisible() {
}
}, []);

if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useDebugValue(isFocusVisible);
}

return { isFocusVisible, onBlurVisible: handleBlurVisible, ref };
}

0 comments on commit 18a4214

Please sign in to comment.