mirror of
https://github.com/twisterarmy/twister-react.git
synced 2025-03-12 13:31:17 +00:00
upgrade to react-router 2.0 yay
This commit is contained in:
parent
b8badf0aa6
commit
e51c9ce13e
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
var ReactBootstrap = require('react-bootstrap')
|
var ReactBootstrap = require('react-bootstrap')
|
||||||
, OverlayMixin = ReactBootstrap.OverlayMixin
|
|
||||||
, Button = ReactBootstrap.Button
|
, Button = ReactBootstrap.Button
|
||||||
, ButtonGroup = ReactBootstrap.ButtonGroup
|
, ButtonGroup = ReactBootstrap.ButtonGroup
|
||||||
, Glyphicon = ReactBootstrap.Glyphicon
|
, Glyphicon = ReactBootstrap.Glyphicon
|
||||||
@ -14,7 +13,6 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
|||||||
var TwistComposer = require("../common/TwistComposer.js");
|
var TwistComposer = require("../common/TwistComposer.js");
|
||||||
|
|
||||||
module.exports = NewPostModalButton = React.createClass({
|
module.exports = NewPostModalButton = React.createClass({
|
||||||
mixins: [OverlayMixin],
|
|
||||||
getInitialState: function () {
|
getInitialState: function () {
|
||||||
return {
|
return {
|
||||||
isModalOpen: false
|
isModalOpen: false
|
||||||
@ -52,9 +50,19 @@ module.exports = NewPostModalButton = React.createClass({
|
|||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<Button onClick={this.handleToggle} className="link-button-gray pull-right fullytight_all" bsStyle="link">
|
<Button onClick={this.handleToggle} className="link-button-gray pull-right fullytight_all" bsStyle="link">
|
||||||
<Glyphicon glyph='pencil' />
|
<Glyphicon glyph='pencil' />
|
||||||
</Button>
|
</Button>
|
||||||
|
<Modal show={this.state.isModalOpen} bsStyle='primary' title={<Glyphicon glyph='pencil'/>} onRequestHide={this.handleToggle}>
|
||||||
|
<div className='modal-body'>
|
||||||
|
<form onSubmit={this.handleNewPost}>
|
||||||
|
<Input type='textarea' label='Write Something' placeholder='textarea'/>
|
||||||
|
<Input type='submit' value='Submit Post' data-dismiss="modal" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
renderOverlay: function() {
|
renderOverlay: function() {
|
||||||
@ -62,19 +70,7 @@ module.exports = NewPostModalButton = React.createClass({
|
|||||||
if (!this.state.isModalOpen) {
|
if (!this.state.isModalOpen) {
|
||||||
return <span/>;
|
return <span/>;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Modal bsStyle='primary' title={<Glyphicon glyph='pencil'/>} onRequestHide={this.handleToggle}>
|
|
||||||
<div className='modal-body'>
|
|
||||||
<form onSubmit={this.handleNewPost}>
|
|
||||||
<Input type='textarea' label='Write Something' placeholder='textarea'/>
|
|
||||||
<Input type='submit' value='Submit Post' data-dismiss="modal" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user