@@ -10,6 +10,7 @@ import DateComponent from '../Date';
1010import { useOvermindActions , useOvermindState } from '../../store' ;
1111import { theme as Theme } from '../../theme' ;
1212import type { Issue } from '../../../types' ;
13+ import { Flex } from '../Flex' ;
1314
1415const styles = {
1516 form : ( theme : typeof Theme ) => css `
@@ -38,29 +39,23 @@ const styles = {
3839 ` ,
3940 commentsList : ( theme : typeof Theme ) => css `
4041 width : 100% ;
41- list-style-type : none;
4242 padding : 20px 0px ;
4343 margin : 0px ;
4444 border-radius : 3px ;
4545 background : ${ theme . bgDark } ;
4646 ` ,
47- commentFirst : css `
48- margin-top : 20px ;
49- ` ,
5047 comment : css `
51- margin : 40px 20px 20px 20px ;
52- display : flex;
53- justify-content : space-around;
48+ flex-grow : 1 ;
49+ margin : 1rem 1rem 1rem 1rem ;
5450 ` ,
5551 commentHeader : css `
5652 flex-grow : 1 ;
57- display : flex;
58- flex-direction : column;
5953 min-width : 20% ;
54+ margin-right : 1rem ;
6055 ` ,
6156 commentAuthorName : ( theme : typeof Theme ) => css `
62- margin-top : 20 px ;
63- margin-bottom : 20 px ;
57+ margin-top : 0 px ;
58+ margin-bottom : 10 px ;
6459 color : ${ theme . main } ;
6560 ` ,
6661 commentDate : ( theme : typeof Theme ) => css `
@@ -109,18 +104,18 @@ const CommentsSection = ({ issueId }: CommentsSectionProps) => {
109104
110105 return (
111106 < >
112- < h2 > Comments</ h2 >
113- < ul css = { styles . commentsList ( theme ) } >
114- { journalEntries . map ( ( entry , index ) => (
115- < li css = { index === 0 ? [ styles . comment , styles . commentFirst ] : [ styles . comment ] } key = { entry . id } >
116- < div css = { styles . commentHeader } >
117- < h3 css = { styles . commentAuthorName ( theme ) } > { entry . user . name } </ h3 >
107+ < h3 > Comments</ h3 >
108+ < Flex alignItems = "stretch" direction = "column" css = { styles . commentsList ( theme ) } >
109+ { journalEntries . map ( ( entry ) => (
110+ < Flex justifyContent = "center" css = { styles . comment } key = { entry . id } >
111+ < Flex direction = "column" css = { styles . commentHeader } >
112+ < h4 css = { styles . commentAuthorName ( theme ) } > { entry . user . name } </ h4 >
118113 < DateComponent className = "date" date = { entry . createdOn } />
119- </ div >
114+ </ Flex >
120115 < MarkdownText css = { styles . markdown ( theme ) } name = { `comment-${ entry . id } ` } markdownText = { entry . notes as string } />
121- </ li >
116+ </ Flex >
122117 ) ) }
123- </ ul >
118+ </ Flex >
124119 < div css = { styles . form ( theme ) } >
125120 < MarkdownEditor id = "comments-form" name = "comments-form" onSubmit = { sendComments } />
126121 < div >
0 commit comments