Skip to content

Commit 1d1ee90

Browse files
committed
add debug value to useIsFocusVisible
1 parent db75d24 commit 1d1ee90

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/material-ui/src/utils/focusVisible.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,10 @@ export function useIsFocusVisible() {
139139
}
140140
}, []);
141141

142+
if (process.env.NODE_ENV !== 'production') {
143+
// eslint-disable-next-line react-hooks/rules-of-hooks
144+
React.useDebugValue(isFocusVisible);
145+
}
146+
142147
return { isFocusVisible, onBlurVisible: handleBlurVisible, ref };
143148
}

0 commit comments

Comments
 (0)