Skip to content

Commit

Permalink
feat : CommentInput ui수정 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowgnuoy authored Sep 27, 2024
1 parent b3979b9 commit 1f2927a
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 14 deletions.
17 changes: 13 additions & 4 deletions frontend/src/components/commentInput/CommentInput.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import styled from 'styled-components';

export const InputContainer = styled.div`
display: flex;
margin-top: 24rem;
bottom: 4rem;
align-items: center;
width: 100%;
width: 32%;
position: fixed;
`;

export const TextInput = styled.input`
width: 81%;
position: fixed;
width: 32%;
height: 5.2rem;
border: 0.2rem solid ${(props) => props.theme.colors.gray400};
border-radius: 1rem;
font-size: 1.6rem;
font-family: 'Pretendard-medium';
Expand All @@ -18,13 +21,19 @@ export const TextInput = styled.input`
`;

export const ButtonClick = styled.button`
position: fixed;
width: 5.2rem;
height: 5.2rem;
margin-left: 2rem;
border: 0.2rem solid ${(props) => props.theme.colors.gray400};
margin-left: 52.6rem;
border-radius: 1rem;
background-color: ${(props) =>
props.isActive ? props.theme.colors.black : props.theme.colors.gray350};
svg {
stroke: ${(props) => (props.isActive ? 'white' : props.theme.colors.black)};
}
${(props) =>
props.isActive &&
`&:hover {
Expand Down
88 changes: 88 additions & 0 deletions frontend/src/components/comments/Comments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,94 @@ export default function Comments() {
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={false}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={false}
isTrash={false}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
<Comment
isBest={true}
isTrash={true}
isHeart={isHeart}
setIsHeart={setIsHeart}
id="1"
nickname="이지영"
time="2분 전"
like="13"
comment="인싸를 만나서 나만 만나는 아싸로 만들래"
/>
</>
);
}
4 changes: 2 additions & 2 deletions frontend/src/components/comments/comment/Comment.styled.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import styled from 'styled-components';

export const CommentContainer = styled.div`
width: 50%;
width: 100%;
background-color: ${(props) =>
props.isBest ? props.theme.colors.gray150 : props.theme.colors.gray100};
border-right: 0.1rem solid ${(props) => props.theme.colors.gray200};
padding: 2.5rem;
`;

export const CommentContainer2 = styled.div`
width: 50%;
width: 100%;
background-color: ${(props) =>
props.isBest ? props.theme.colors.gray150 : props.theme.colors.gray100};
border-left: 0.1rem solid ${(props) => props.theme.colors.gray200};
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/common/icon/ArrowIcon.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const ArrowIcon = () => (
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 3L8 17" stroke="white" strokeWidth="2" strokeLinecap="round" />
<path d="M1 9L8 2L15 9" stroke="white" strokeWidth="2" strokeLinecap="round" />
<path d="M8 3L8 17" stroke="current" strokeWidth="2" strokeLinecap="round" />
<path d="M1 9L8 2L15 9" stroke="current" strokeWidth="2" strokeLinecap="round" />
</svg>
);

Expand Down
14 changes: 8 additions & 6 deletions frontend/src/pages/GamePage/GamePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ export default function GamePage() {
<>
<Choice game={gameData} />
<S.Container>
<Comments />
<Comments />
</S.Container>
<S.Container>
<CommentInput />
<CommentInput />
<S.SmallContainer>
<CommentInput />
<Comments />
</S.SmallContainer>
<S.SmallContainer>
<CommentInput />
<Comments />
</S.SmallContainer>
</S.Container>
</>
);
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/pages/GamePage/GamePage.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ export const Container = styled.div`
display: flex;
width: 100%;
`;

export const SmallContainer = styled.div`
width: 100%;
/* height: 31rem; */
overflow: hidden;
/* border: 1px solid red; */
`;

0 comments on commit 1f2927a

Please sign in to comment.