diff --git a/src/components/answerlist/AnswerComp.tsx b/src/components/answerlist/AnswerComp.tsx new file mode 100644 index 0000000..13802c8 --- /dev/null +++ b/src/components/answerlist/AnswerComp.tsx @@ -0,0 +1,65 @@ +import React from 'react' +import styled from 'styled-components' +import { Answer } from 'types/Answer' + +function AnswerComp({ name, contents, time, likeNum }: Answer) { + return ( + <> + +
{name}
+
{contents}
+ +
{time}
+
{likeNum}
+
+
+ + ) +} + +export default AnswerComp + +const AnswerBlock = styled.div` + display: inline-block; + width: 328px; + height: fit-content; + margin: 15px 15px 0px; + text-align: left; + border-bottom: 1px solid #5e5474; + + .userName { + font-weight: 400; + } + .contents { + display: inline-block; + width: 328px; + height: fit-content; + margin: 10px 0px; + line-height: 130%; + font-size: 11pt; + } +` +const AnswerInfoBlock = styled.div` + display: flex; + margin-bottom: 10px; + + .time { + display: inline-block; + color: #716d74; + align-items: center; + justify-content: center; + padding-right: 80px; + padding-top: 10px; + } + + .likeButton { + display: felx; + width: 80px; + height: 24px; + align-items: center; + justify-content: center; + background-color: #5e5474; + border-radius: 5px; + text-align: center; + } +` diff --git a/src/components/answerlist/AnswerList.tsx b/src/components/answerlist/AnswerList.tsx new file mode 100644 index 0000000..659fb06 --- /dev/null +++ b/src/components/answerlist/AnswerList.tsx @@ -0,0 +1,32 @@ +import React, { useState } from 'react' +import AnswerComp from './AnswerComp' +import styled from 'styled-components' +import { AnswerListProps } from 'types/Answer' + +function AnswerList({ answers }: AnswerListProps) { + return ( + <> + + {answers.map(answer => ( + + ))} + + + ) +} + +export default AnswerList + +const AnswerListLayout = styled.div` + position: relative; + width: 360px; + height: 455px; + background-color: #514184; + border-radius: 16px 16px 0px 0px; + color: white; +`