From 59e21cccbaa84e7266d0a4dd6941574d81394d0e Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 11 Sep 2017 10:51:27 -0300 Subject: [PATCH 1/6] Container for Button --- .../talk-plugin-featured-comments/client/components/Button.js | 3 +-- .../talk-plugin-featured-comments/client/containers/Button.js | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 plugins/talk-plugin-featured-comments/client/containers/Button.js diff --git a/plugins/talk-plugin-featured-comments/client/components/Button.js b/plugins/talk-plugin-featured-comments/client/components/Button.js index c581ce027..5bb174c30 100644 --- a/plugins/talk-plugin-featured-comments/client/components/Button.js +++ b/plugins/talk-plugin-featured-comments/client/components/Button.js @@ -3,7 +3,6 @@ import cn from 'classnames'; import styles from './Button.css'; import {pluginName} from '../../package.json'; import {can} from 'plugin-api/beta/client/services'; -import {withTags} from 'plugin-api/beta/client/hocs'; import {Icon} from 'plugin-api/beta/client/components/ui'; const Button = (props) => { @@ -23,4 +22,4 @@ const Button = (props) => { ) : null ; }; -export default withTags('featured')(Button); +export default Button; diff --git a/plugins/talk-plugin-featured-comments/client/containers/Button.js b/plugins/talk-plugin-featured-comments/client/containers/Button.js new file mode 100644 index 000000000..d927b0125 --- /dev/null +++ b/plugins/talk-plugin-featured-comments/client/containers/Button.js @@ -0,0 +1,4 @@ +import Button from '../components/Button'; +import {withTags} from 'plugin-api/beta/client/hocs'; + +export default withTags('featured')(Button); From 908b3c20b48ad0f48e302f80307f917ef5d44103 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 11 Sep 2017 10:59:16 -0300 Subject: [PATCH 2/6] Adding FeaturedButton (we already have Button with Coral-UI) --- .../client/components/Comment.js | 4 ++-- .../client/components/{Button.css => FeaturedButton.css} | 0 .../client/components/{Button.js => FeaturedButton.js} | 6 +++--- .../client/components/ModActionButton.js | 5 ++--- .../client/containers/Button.js | 4 ---- .../client/containers/FeaturedButton.js | 4 ++++ .../client/containers/ModActionButton.js | 6 ++++-- 7 files changed, 15 insertions(+), 14 deletions(-) rename plugins/talk-plugin-featured-comments/client/components/{Button.css => FeaturedButton.css} (100%) rename plugins/talk-plugin-featured-comments/client/components/{Button.js => FeaturedButton.js} (85%) delete mode 100644 plugins/talk-plugin-featured-comments/client/containers/Button.js create mode 100644 plugins/talk-plugin-featured-comments/client/containers/FeaturedButton.js diff --git a/plugins/talk-plugin-featured-comments/client/components/Comment.js b/plugins/talk-plugin-featured-comments/client/components/Comment.js index 1c2045110..779844177 100644 --- a/plugins/talk-plugin-featured-comments/client/components/Comment.js +++ b/plugins/talk-plugin-featured-comments/client/components/Comment.js @@ -5,7 +5,7 @@ import {t, timeago} from 'plugin-api/beta/client/services'; import {Slot, CommentAuthorName} from 'plugin-api/beta/client/components'; import {Icon} from 'plugin-api/beta/client/components/ui'; import {pluginName} from '../../package.json'; -import Button from './Button'; +import FeaturedButton from '../containers/FeaturedButton'; class Comment extends React.Component { @@ -50,7 +50,7 @@ class Comment extends React.Component { inline /> -