Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

cesarp/react-onclickoutside

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An onClickOutside mixin for React components

installation

If you have Node.js needs, you can install this mixin via npm, using:

npm install react-onclickoutside --save

(or --save-dev depending on your needs). You then use it in your components as:

var Component = React.createClass({
  mixins: [
    require('react-onclickoutside')
  ],

  handleClickOutside: function(evt) {
    // ...handling code goes here...
  }
});

If you have plain-old-browser needs, you can install this mixin via bower, using:

bower install react-onclickoutside

and then include it as script via:

<script src="bower_components/react-onclickoutside/index.js"></script>

Then use it as:

var Component = React.createClass({
  mixins: [
    OnClickOutside
  ],

  handleClickOutside: function(evt) {
    // ...handling code goes here...
  }
});

For bugs and enhancements hit up https://github.com/Pomax/react-onclickoutside/issues

About

An onClickOutside mixin for React components

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%