JSPM

react-clickaway

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q27187F
  • License ISC

Clickaway mixin for react.

Package Exports

  • react-clickaway

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-clickaway) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Clickaway

Mixin that adds a componentClickAway method to react components that fires the you click away from it.

Installation

npm install react-clickaway --save

Add it to your component

mixins: [
  require('react-clickaway')
]

And then just add the method:

componentClickAway: function() {
  console.log('Someone clicked outside this component...')
}

Thanks

This is just a modularized version of the https://github.com/callemall work, they used this script internally on material-ui.