mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Plugins renaming
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import CommentBox from '../talk-plugin-commentbox/CommentBox';
|
||||
|
||||
const name = 'talk-plugin-replies';
|
||||
|
||||
class ReplyBox extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
document.getElementById('replyText').focus();
|
||||
}
|
||||
|
||||
cancelReply = () => {
|
||||
this.props.setActiveReplyBox('');
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
styles,
|
||||
postComment,
|
||||
assetId,
|
||||
currentUser,
|
||||
addNotification,
|
||||
parentId,
|
||||
commentPostedHandler,
|
||||
maxCharCount,
|
||||
charCountEnable
|
||||
} = this.props;
|
||||
return <div className={`${name}-textarea`} style={styles && styles.container}>
|
||||
<CommentBox
|
||||
maxCharCount={maxCharCount}
|
||||
charCountEnable={charCountEnable}
|
||||
commentPostedHandler={commentPostedHandler}
|
||||
parentId={parentId}
|
||||
onCancel={this.cancelReply}
|
||||
addNotification={addNotification}
|
||||
currentUser={currentUser}
|
||||
assetId={assetId}
|
||||
postComment={postComment}
|
||||
isReply={true} />
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
||||
ReplyBox.propTypes = {
|
||||
charCountEnable: PropTypes.bool.isRequired,
|
||||
maxCharCount: PropTypes.number,
|
||||
setActiveReplyBox: PropTypes.func.isRequired,
|
||||
commentPostedHandler: PropTypes.func,
|
||||
parentId: PropTypes.string,
|
||||
addNotification: PropTypes.func.isRequired,
|
||||
postComment: PropTypes.func.isRequired,
|
||||
assetId: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
export default ReplyBox;
|
||||
Reference in New Issue
Block a user