Skip to content

Instantly share code, notes, and snippets.

@ivanoats
Created February 25, 2015 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanoats/917d99f808bdf422d10a to your computer and use it in GitHub Desktop.
Save ivanoats/917d99f808bdf422d10a to your computer and use it in GitHub Desktop.
WIP on drop zone
import React from 'react/addons';
export class RightDropZone extends React.Component {
constructor(props) {
super(props);
this.state = {
draggedOver: false
}
}
render() {
var cx = React.addons.classSet;
var classes = cx({
'dragged-over': this.state.draggedOver
});
return (
<section
className={classes}
id="right-drop-zone"
onDragOver={this.handleDragOver.bind(this)}
style={this.state.style}
>
<p>Right Drop Zone</p>
</section>
);
}
handleDragOver(ev) {
ev.preventDefault();
this.setState({draggedOver: true})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment