| 1234567891011121314151617181920212223242526 |
- var React = require('react'),
- ReactDOM = require('react-dom'),
- BootstrapModal = require('./BootstrapModal.js');
- var NewThing = React.createClass({
- handleCancel: function() {
- if (confirm('Are you sure you want to cancel?')) {
- this.refs.modal.close();
- }
- },
- render: function () {
- return (
- <BootstrapModal ref="modal" confirm="OK" cancel="Cancel" onCancel={this.handleCancel} onConfirm={this.closeModal} title="New Thing">
- <textarea className="form-control" id="inputContent" rows="5" autofocus />
- </BootstrapModal>
- );
- },
- openModal: function() {
- this.refs.modal.open();
- },
- closeModal: function() {
- this.refs.modal.close();
- }
- });
- module.exports = NewThing;
|