From a73b93b0c34e7fa9c3287c3e3a91eda0cc2378cb Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 21 Mar 2018 16:04:03 +0100 Subject: [PATCH] Move label and placeholder to plugins --- .../src/tabs/stream/components/CommentForm.js | 16 +---- .../src/tabs/stream/components/DraftArea.js | 10 +--- .../stream/components/DraftAreaContent.js | 60 +++++++++++++------ .../components/EditableCommentContent.js | 2 +- .../src/tabs/stream/containers/CommentBox.js | 4 +- .../src/tabs/stream/containers/DraftArea.js | 4 -- 6 files changed, 49 insertions(+), 47 deletions(-) diff --git a/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js b/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js index 64e0fbf84..a65950d7d 100644 --- a/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js +++ b/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js @@ -18,14 +18,8 @@ class CommentForm extends React.Component { charCountEnable: PropTypes.bool.isRequired, maxCharCount: PropTypes.number, - // DOM ID for form input that edits comment body - bodyInputId: PropTypes.string, - - // screen reader label for input that edits comment body - bodyLabel: PropTypes.string, - - // Placeholder for input that edits comment body - bodyPlaceholder: PropTypes.string, + // Unique identifier for this form + id: PropTypes.string, // render at start of button container (useful for extra buttons) buttonContainerStart: PropTypes.node, @@ -59,8 +53,6 @@ class CommentForm extends React.Component { }; static get defaultProps() { return { - bodyLabel: t('comment_box.comment'), - bodyPlaceholder: t('comment_box.comment'), submitText: t('comment_box.post'), submitButtonCStyle: 'darkGrey', submitEnabled: () => true, @@ -114,10 +106,8 @@ class CommentForm extends React.Component { - ( -