Vulcan/packages/nova-base-components/lib/comments/CommentsEdit.jsx
Sacha Greif 6665a7c968 making component names and class names more consistent.
- Posts, Comments, Users, etc. are always pluralized.
- CSS classes are based off component names (PostsTitle -> posts-title)
2016-04-19 15:45:36 +09:00

35 lines
No EOL
853 B
JavaScript

import React, { PropTypes, Component } from 'react';
import Actions from '../actions.js';
import NovaForm from "meteor/nova:forms";
class CommentsEdit extends Component {
render() {
return (
<div className="comments-edit-form">
<NovaForm
collection={Comments}
document={this.props.comment}
currentUser={this.context.currentUser}
methodName="comments.edit"
successCallback={this.props.successCallback}
layout="elementOnly"
cancelCallback={this.props.cancelCallback}
/>
</div>
)
}
}
CommentsEdit.propTypes = {
comment: React.PropTypes.object.isRequired,
successCallback: React.PropTypes.func,
cancelCallback: React.PropTypes.func
}
CommentsEdit.contextTypes = {
currentUser: React.PropTypes.object
}
module.exports = CommentsEdit;