Skip to content

Instantly share code, notes, and snippets.

@icodeforlove
Created July 25, 2014 10:14
Show Gist options
  • Select an option

  • Save icodeforlove/daea3fca498720e0ed93 to your computer and use it in GitHub Desktop.

Select an option

Save icodeforlove/daea3fca498720e0ed93 to your computer and use it in GitHub Desktop.
react directive-like overlay
var WrappedOverlayExample = React.createClass({
handleClose: function () {
this.refs.overlay.fadeOut(function () {
this.props.onClose();
}.bind(this));
},
render: function () {
return (
<Overlay ref="overlay">
<a onClick={this.handleClose}>Close</a>
</Overlay>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment