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 Mar 17, 2020
1 parent db75d24 commit 1d1ee90
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 1d1ee90

Please sign in to comment.