Skip to content

Commit d0b47ec

Browse files
committed
🎨 Design: 반려견등록 첫 페이지 ui
1 parent e6d571c commit d0b47ec

File tree

6 files changed

+109
-2
lines changed

6 files changed

+109
-2
lines changed

src/assets/add-dog-profile.svg

Lines changed: 4 additions & 0 deletions
Loading

src/assets/add-family-code.svg

Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import * as S from './styles'
2+
import { useModalStore } from '~stores/modalStore'
3+
import { Typo20 } from '~components/Typo'
4+
import { ReactNode } from 'react'
5+
6+
interface SelectSectionButtonProps {
7+
title: string
8+
description: string
9+
src: string
10+
modal: ReactNode
11+
}
12+
13+
export default function SelectSectionButton({ title, description, src, modal }: SelectSectionButtonProps) {
14+
const { pushModal } = useModalStore()
15+
16+
return (
17+
<S.SelectSectionButton onClick={() => pushModal(modal)}>
18+
<S.TypoWrapper>
19+
<Typo20 weight='700'>{title}</Typo20>
20+
</S.TypoWrapper>
21+
<S.Desc>{description}</S.Desc>
22+
<S.ImageWrapper>
23+
<img src={src} alt='반려견 등록' />
24+
</S.ImageWrapper>
25+
</S.SelectSectionButton>
26+
)
27+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import styled from 'styled-components'
2+
3+
export const SelectSectionButton = styled.button`
4+
width: 100%;
5+
height: 160px;
6+
padding: 20px 24px;
7+
border: solid 2px ${({ theme }) => theme.colors.grayscale.gc_1};
8+
border-radius: 12px;
9+
display: flex;
10+
flex-direction: column;
11+
gap: 4px;
12+
13+
cursor: pointer;
14+
`
15+
16+
export const TypoWrapper = styled.div`
17+
text-align: start;
18+
max-width: 114px;
19+
`
20+
21+
export const Desc = styled.div`
22+
color: ${({ theme }) => theme.colors.grayscale.font_3};
23+
color: gray;
24+
font-size: 13px;
25+
`
26+
27+
export const ImageWrapper = styled.div`
28+
margin-left: auto;
29+
margin-top: auto;
30+
`

src/pages/RegisterPage/Dog/index.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import * as S from './styles'
22
import { Helmet } from 'react-helmet-async'
3+
import { Typo24 } from '~components/Typo/index'
4+
import SelectSectionButton from './SelectSectionButton'
5+
import addDogProfile from '~assets/add-dog-profile.svg'
6+
import addFamilycode from '~assets/add-family-code.svg'
37
import DogProfileSection from '~modals/RegisterDogModal/DogProfileSection'
8+
import FamilyCodeSection from '~modals/RegisterDogModal/FamilyCodeSection'
49

510
export default function RegisterDogPage() {
611
return (
@@ -9,7 +14,26 @@ export default function RegisterDogPage() {
914
<title>DDang | 반려견 정보 등록</title>
1015
<meta name='description' content='반려견의 정보를 등록하세요.' />
1116
</Helmet>
12-
<DogProfileSection />
17+
<S.TypoWrapper>
18+
<Typo24 weight='700'>
19+
키우는 반려견을 등록하고
20+
<br /> 즐거운 산책을 시작하세요!
21+
</Typo24>
22+
</S.TypoWrapper>
23+
<S.ButtonWrapper>
24+
<SelectSectionButton
25+
title='반려견 프로필 추가하기'
26+
description='반려견 프로필을 추가해보세요'
27+
src={addDogProfile}
28+
modal={<DogProfileSection />}
29+
/>
30+
<SelectSectionButton
31+
title='가족 반려견 등록하기'
32+
description='가족 코드를 등록해보세요'
33+
src={addFamilycode}
34+
modal={<FamilyCodeSection />}
35+
/>
36+
</S.ButtonWrapper>
1337
</S.RegisterDogPage>
1438
)
1539
}

src/pages/RegisterPage/Dog/styles.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
import { styled } from 'styled-components'
22

3-
export const RegisterDogPage = styled.div``
3+
export const RegisterDogPage = styled.div`
4+
padding: 120px 20px 24px 20px;
5+
background-color: ${({ theme }) => theme.colors.grayscale.gc_4};
6+
height: 100dvh;
7+
8+
@media (max-height: 700px) {
9+
padding: 100px 20px 24px 20px;
10+
}
11+
`
12+
13+
export const TypoWrapper = styled.div`
14+
text-align: start;
15+
margin-bottom: 40px;
16+
`
17+
18+
export const ButtonWrapper = styled.div`
19+
display: grid;
20+
gap: 12px;
21+
`

0 commit comments

Comments
 (0)