Click-Away Listener
The Click-Away Listener component detects when a click event happens outside of its child element.
ClickAwayListener API
Import
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
// or
import { ClickAwayListener } from '@mui/base';
The component cannot hold a ref.