Skip to content

Commit

Permalink
Feat: 제목 컴포넌트 분리 #10
Browse files Browse the repository at this point in the history
공통 컴포넌트 BigTitle 생성
  • Loading branch information
devhaeun committed Jan 26, 2025
1 parent 2bdabbe commit 7b8a3b7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
35 changes: 35 additions & 0 deletions src/components/BigTitle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import styled from "styled-components";

const BigTitle = ({children}:{children:string}) => {
return (
<BigTitleBox>
<TitleIcon />
{children}
</BigTitleBox>
)
}

export default BigTitle;

const BigTitleBox = styled.div`
width: 1080px;
height: 53px;
display: flex;
align-items: center;
border-bottom: 1px solid black;
color: #000;
font-family: Pretendard;
font-size: 22px;
font-style: normal;
font-weight: 600;
line-height: normal;
`

const TitleIcon = styled.span`
display: inline-block;
width: 14px;
height: 14px;
background-color: #C908FF;
border-radius: 50%;
margin-right: 52px;
`
29 changes: 2 additions & 27 deletions src/pages/RaffleUploadPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import styled from "styled-components";
import BigTitle from "../components/BigTitle";

const RaffleUploadPage = () => {
return (
<UploadForm>
<div>
<BigTitle>
<TitleIcon />
상품 정보
</BigTitle>
<BigTitle>상품 정보</BigTitle>
<ItemInfoContainer>
<ImgContainer>
<ImgSpan>상품 이미지</ImgSpan>
Expand Down Expand Up @@ -43,7 +41,6 @@ const RaffleUploadPage = () => {
</div>
<div>
<BigTitle>
<TitleIcon/>
거래 설정
</BigTitle>
<SetConditionContainer>
Expand Down Expand Up @@ -90,28 +87,6 @@ const UploadForm = styled.form`
padding-top: 63px;
`

const BigTitle = styled.div`
width: 1080px;
height: 53px;
display: flex;
align-items: center;
border-bottom: 1px solid black;
color: #000;
font-family: Pretendard;
font-size: 22px;
font-style: normal;
font-weight: 600;
line-height: normal;
`
const TitleIcon = styled.span`
display: inline-block;
width: 14px;
height: 14px;
background-color: #C908FF;
border-radius: 50%;
margin-right: 52px;
`

const ItemInfoContainer = styled.div`
display: flex;
column-gap: 73px;
Expand Down

0 comments on commit 7b8a3b7

Please sign in to comment.