Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 381 Bytes

OutsideClick.md

File metadata and controls

20 lines (12 loc) · 381 Bytes

<OutsideClick>

Tracks clicks outside its children.

Usage

import {OutsideClick} from 'libreact/lib/OutsideClick';

<OutsideClick onClick={}>
  <div>Don't click here.</div>
</OutsideClick>

Props

  • onClick — event called when user click outside of its children.
  • event — optional, string, event name subscribe to, defaults to mousedown.