diff --git a/apps/comments-ui/src/components/Comment.js b/apps/comments-ui/src/components/Comment.js index da89edf4a2..4a831d61e5 100644 --- a/apps/comments-ui/src/components/Comment.js +++ b/apps/comments-ui/src/components/Comment.js @@ -1,10 +1,10 @@ import {formatRelativeTime} from '../utils/helpers'; -import {ReactComponent as LikeIcon} from '../images/icons/like.svg'; -import {ReactComponent as MoreIcon} from '../images/icons/more.svg'; import React from 'react'; import AppContext from '../AppContext'; -import CommentContextMenu from './modals/CommentContextMenu'; import Avatar from './Avatar'; +import CommentContextMenu from './modals/CommentContextMenu'; +import {ReactComponent as LikeIcon} from '../images/icons/like.svg'; +import {ReactComponent as MoreIcon} from '../images/icons/more.svg'; class Comment extends React.Component { static contextType = AppContext; diff --git a/apps/comments-ui/src/components/Like.js b/apps/comments-ui/src/components/Like.js index b5263f347c..cbd9c95ce7 100644 --- a/apps/comments-ui/src/components/Like.js +++ b/apps/comments-ui/src/components/Like.js @@ -1,8 +1,8 @@ +import {ReactComponent as LikeIcon} from '../images/icons/like.svg'; + function Like() { return ( -
- 4 Likes -
+ ); } diff --git a/apps/comments-ui/src/components/More.js b/apps/comments-ui/src/components/More.js index f50442c465..bccfff1650 100644 --- a/apps/comments-ui/src/components/More.js +++ b/apps/comments-ui/src/components/More.js @@ -1,9 +1,36 @@ -function More() { - return ( -
- More -
- ); +import {ReactComponent as MoreIcon} from '../images/icons/more.svg'; +import React from 'react'; +import AppContext from '../AppContext'; +import CommentContextMenu from './modals/CommentContextMenu'; + +class More extends React.Component { + static contextType = AppContext; + + constructor(props) { + super(props); + this.state = { + isContextMenuOpen: false + }; + + this.toggleContextMenu = this.toggleContextMenu.bind(this); + } + + toggleContextMenu() { + this.setState(state => ({ + isContextMenuOpen: !state.isContextMenuOpen + })); + } + + render() { + const comment = this.props.comment; + + return ( +
+ + {this.state.isContextMenuOpen ? : null} +
+ ); + } } export default More; diff --git a/apps/comments-ui/src/components/Reply.js b/apps/comments-ui/src/components/Reply.js index a574636a00..ac6db5e5e8 100644 --- a/apps/comments-ui/src/components/Reply.js +++ b/apps/comments-ui/src/components/Reply.js @@ -1,9 +1,9 @@ +import {ReactComponent as ReplyIcon} from '../images/icons/reply.svg'; + function Reply() { return ( -
- Reply -
+ ); } -export default Reply; +export default Reply; \ No newline at end of file