1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

modal try 1

This commit is contained in:
ddejongh 2015-05-26 16:52:53 +02:00
parent d685d68d15
commit 3a103c1d99

View File

@ -78,17 +78,20 @@ let ShareModal = React.createClass({
getInitialState: function() { getInitialState: function() {
return { return {
isModalOpen: true isOpen: true
}; };
}, },
hide: function(){
this.setState({isOpen: false})
},
renderOverlay: function() { renderOverlay: function() {
if (!this.state.isModalOpen) { if (!this.state.isOpen) {
return <span/>; return <span/>;
} }
}, },
render: function() { render: function() {
return ( return (
<Modal title="Share artwork"> <Modal title="Share artwork" onRequestHide={this.hide}>
</Modal> </Modal>
); );
} }