An open API service indexing awesome lists of open source software.

https://github.com/javierbyte/react-clickaway

Clickaway mixin for react, based on https://github.com/callemall work
https://github.com/javierbyte/react-clickaway

Last synced: 2 months ago
JSON representation

Clickaway mixin for react, based on https://github.com/callemall work

Awesome Lists containing this project

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

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

And then just add the method:

```js
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.