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:
parent
d685d68d15
commit
3a103c1d99
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user