Vulcan/packages/nova-base-components/lib/comments/CommentsEditForm.jsx

34 lines
812 B
React
Raw Normal View History

2016-03-17 17:48:25 +09:00
import React, { PropTypes, Component } from 'react';
import NovaForm from "meteor/nova:forms";
2016-06-23 12:17:39 +09:00
import Comments from "meteor/nova:comments";
2016-02-18 21:39:33 +09:00
2016-04-14 10:12:35 +09:00
class CommentsEdit extends Component {
2016-02-18 21:39:33 +09:00
render() {
return (
<div className="comments-edit-form">
<NovaForm
collection={Comments}
document={this.props.comment}
methodName="comments.edit"
successCallback={this.props.successCallback}
2016-04-08 10:29:32 +09:00
layout="elementOnly"
cancelCallback={this.props.cancelCallback}
2016-02-18 21:39:33 +09:00
/>
</div>
2016-02-18 21:39:33 +09:00
)
}
2016-03-17 17:48:25 +09:00
}
2016-04-14 10:12:35 +09:00
CommentsEdit.propTypes = {
2016-03-17 17:48:25 +09:00
comment: React.PropTypes.object.isRequired,
successCallback: React.PropTypes.func,
2016-03-17 17:48:25 +09:00
cancelCallback: React.PropTypes.func
}
2016-02-18 21:39:33 +09:00
2016-04-14 10:12:35 +09:00
CommentsEdit.contextTypes = {
currentUser: React.PropTypes.object
}
2016-04-14 10:12:35 +09:00
module.exports = CommentsEdit;