From 411ec7648722c05fa472b68f090ae4c2c255ecda Mon Sep 17 00:00:00 2001 From: SandraBergstrom Date: Wed, 5 Jul 2023 12:02:55 +0000 Subject: [PATCH] Style comments --- src/pages/comments/Comment.js | 75 +++++++++++++++++------------------ src/styles/Comment.module.css | 21 ++++++++-- 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/src/pages/comments/Comment.js b/src/pages/comments/Comment.js index b90dbba..5ce422f 100644 --- a/src/pages/comments/Comment.js +++ b/src/pages/comments/Comment.js @@ -95,7 +95,7 @@ const Comment = (props) => { return (

- + @@ -115,46 +115,45 @@ const Comment = (props) => { /> ) : (
-

{content}

-
- {likes_count} - {is_owner ? ( - You can't like your own comment! - } - > - - - ) : like_id ? ( - - - - ) : currentUser ? ( - - - - ) : ( - Log in to like comments!} - > - - - )} -
+

{content}

)} - {is_owner && !showEditForm && ( - setShowEditForm(true)} - handleDelete={handleDelete} - /> - )} +
+
+ {likes_count} + {is_owner ? ( + You can't like your own comment!} + > + + + ) : like_id ? ( + + + + ) : currentUser ? ( + + + + ) : ( + Log in to like comments!} + > + + + )} +
+ {is_owner && !showEditForm && ( + setShowEditForm(true)} + handleDelete={handleDelete} + /> + )} +
); diff --git a/src/styles/Comment.module.css b/src/styles/Comment.module.css index 7f5b3ed..e396953 100644 --- a/src/styles/Comment.module.css +++ b/src/styles/Comment.module.css @@ -1,7 +1,12 @@ .Body { - display: flex; - flex-direction: column; - width: 90%; + display: flex; + flex-direction: column; + width: 90%; +} + +.mediaGroup { + display: flex; + align-items: flex-start; } .Owner { @@ -17,4 +22,12 @@ p { text-align: left; -} \ No newline at end of file + margin: 0 30px 10px 0; +} + +.iconsRight { + display: flex; + flex-direction: column-reverse; + align-items: flex-start >; + padding-left: 5px +}