@mui/material
Version:
Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.
12 lines • 343 B
JavaScript
export default function getOpenInteractionType(event) {
if (!event) {
return null;
}
if (event.type === 'mousedown' || event.type === 'pointerdown' || event.type === 'touchstart') {
return 'pointer';
}
if (event.type === 'keydown' || event.type === 'click' && event.detail === 0) {
return 'keyboard';
}
return null;
}