outclick-react
v1.1.19
Published
A React component to handle clicks outside of one or more components
Downloads
10
Maintainers
Readme
Install
npm install --save outclick-react
or
yarn add outclick-react
Description
Library to handle outside clicks that also supports multiple components in the children.
Usage
import OutClick from 'outclick-react';
function App() {
return (
<OutClick
onOutClick={() => {
alert('You clicked outside this component!!!');
}}>
{/* Component or multiple components */}
</OutClick>
);
}