mirror of
https://github.com/ascribe/onion.git
synced 2024-12-24 02:16:10 +01:00
32 lines
929 B
JavaScript
32 lines
929 B
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
|
|
import AppConstants from '../../constants/application_constants';
|
|
|
|
let ButtonSubmitOrClose = React.createClass({
|
|
propTypes: {
|
|
submitted: React.PropTypes.bool.isRequired,
|
|
text: React.PropTypes.string.isRequired,
|
|
onClose: React.PropTypes.func.isRequired
|
|
},
|
|
|
|
render() {
|
|
if (this.props.submitted){
|
|
return (
|
|
<div className="modal-footer">
|
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_medium.gif'} />
|
|
</div>
|
|
);
|
|
}
|
|
return (
|
|
<div className="modal-footer">
|
|
<button type="submit" className="btn btn-ascribe-inv">{this.props.text}</button>
|
|
<button className="btn btn-ascribe-inv" onClick={this.props.onClose}>CLOSE</button>
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default ButtonSubmitOrClose;
|