var React = require('react'); var UnsavedFeature = React.createClass({ render: function() { return (
); }, saveFeature: function(e) { e.preventDefault(); this.props.feature.name = this.refs.name.getDOMNode().value; this.props.feature.description = this.refs.description.getDOMNode().value; this.props.feature.strategy = this.refs.strategy.getDOMNode().value; this.props.feature.enabled = this.refs.enabled.getDOMNode().checked; this.props.onSubmit(this.props.feature); }, cancelFeature: function(e) { e.preventDefault(); this.props.onCancel(this.props.feature); } }); module.exports = UnsavedFeature;