diff --git a/FE/src/components/DetailedIssue/Comment/Comment.jsx b/FE/src/components/DetailedIssue/Comment/Comment.jsx index 7b1c39e..633fcb8 100644 --- a/FE/src/components/DetailedIssue/Comment/Comment.jsx +++ b/FE/src/components/DetailedIssue/Comment/Comment.jsx @@ -2,45 +2,59 @@ import React from "react"; import { data } from "@Mock/detailedIssue"; -import { makeStyles } from "@material-ui/core/styles"; -import Box from "@material-ui/core/Box"; - import CustomTable from "@Components/common/CustomTable"; import CustomAvatar from "@Components/common/CustomAvatar"; import ToolBar from "./ToolBar"; +import Write from "./Write/Write"; + +import Box from "@material-ui/core/Box"; +import Button from "@material-ui/core/Button"; +import TextareaAutosize from "@material-ui/core/TextareaAutosize"; +import { makeStyles } from "@material-ui/core/styles"; const Comment = () => { + const authorName = data.issue.author.userName; const { comments } = data.issue.commentInfo; const classes = useStyles(); - const tableRender = (userName, userId, description, createdAt, author) => { + const tableRender = (userName, userId, description, createdAt) => { return ( } - bodyContents={[{ id: userId, contents: description }]} + ariaLabel={"Issue comment"} className={classes.table} + hover={false} + headContents={} + bodyContents={[{ id: userId, contents: description }]} + bodyContents={[ + { + id: userId, + contents: , + }, + ]} /> ); }; return ( - <> + {comments.map((comment) => { const { userId, userName, avatarUrl, createdAt, description, author } = comment; const commentTable = ( - + {tableRender(userName, userId, description, createdAt, author)} + {/* {tableRender(userName, userId, description, createdAt, author)} - + */} ); return commentTable; })} - + + ); }; @@ -53,14 +67,16 @@ const useStyles = makeStyles(() => ({ "& .MuiTableRow-hover": { pointerEvents: "none", }, - "& .author": { - backgroundColor: "red", + }, + edit: { + "& textarea": { + width: "100%", }, }, avatar: { position: "absolute", top: 3, - left: -5, + left: -47, }, })); diff --git a/FE/src/components/DetailedIssue/Comment/Write/Textarea.jsx b/FE/src/components/DetailedIssue/Comment/Write/Textarea.jsx new file mode 100644 index 0000000..ca71233 --- /dev/null +++ b/FE/src/components/DetailedIssue/Comment/Write/Textarea.jsx @@ -0,0 +1,15 @@ +import React from "react"; +import TextareaAutosize from "@material-ui/core/TextareaAutosize"; + +import Button from "@material-ui/core/Button"; + +const TextArea = () => { + return ( + <> + + + + ); +}; + +export default TextArea; diff --git a/FE/src/components/DetailedIssue/Comment/Write.jsx b/FE/src/components/DetailedIssue/Comment/Write/Write.jsx similarity index 96% rename from FE/src/components/DetailedIssue/Comment/Write.jsx rename to FE/src/components/DetailedIssue/Comment/Write/Write.jsx index 980452c..4dc904e 100644 --- a/FE/src/components/DetailedIssue/Comment/Write.jsx +++ b/FE/src/components/DetailedIssue/Comment/Write/Write.jsx @@ -5,7 +5,7 @@ import CustomTable from "@Components/common/CustomTable"; import Button from "@material-ui/core/Button"; import TextareaAutosize from "@material-ui/core/TextareaAutosize"; import { makeStyles } from "@material-ui/core/styles"; -import TextArea from "../TextArea"; +import TextArea from "./TextArea"; const Write = () => { const WRITE_BTN_TEXT = "write"; diff --git a/FE/src/components/common/CustomTable.jsx b/FE/src/components/common/CustomTable.jsx index 9563200..7fa7a77 100644 --- a/FE/src/components/common/CustomTable.jsx +++ b/FE/src/components/common/CustomTable.jsx @@ -11,7 +11,7 @@ import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import Paper from "@material-ui/core/Paper"; -const CustomTable = ({ ariaLabel, headContents, bodyContents, ...props }) => { +const CustomTable = ({ ariaLabel, headContents, bodyContents, hover, ...props }) => { const classes = useStyles(); return ( @@ -28,7 +28,7 @@ const CustomTable = ({ ariaLabel, headContents, bodyContents, ...props }) => { {bodyContents.map(({ id, contents }) => ( - + {contents} @@ -59,9 +59,11 @@ const useStyles = makeStyles(() => ({ CustomTable.defaultProps = { ariaLabel: "table", + hover: false, }; CustomTable.propTypes = { + hover: PropTypes.bool, ariaLabel: PropTypes.string, headContents: PropTypes.element.isRequired, bodyContents: PropTypes.arrayOf(