-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from prgrms-web-devcourse-final-project/68-de…
…sign/walk-result-ui [Design] #68 산책 마무리 및 강번따 UI 구현
- Loading branch information
Showing
11 changed files
with
396 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as S from './styles' | ||
|
||
const walkData = { | ||
date: '2024.12.14', | ||
time: '1:10:00', | ||
distance: '2.4km', | ||
calories: '200kcal', | ||
mapImage: 'https://imagedelivery.net/CJyrB-EkqcsF2D6ApJzEBg/6d853db2-fb51-465c-eaa8-e9e38be01f00/public', | ||
} | ||
|
||
export default function WalkCompletePage() { | ||
return ( | ||
<S.WalkCompletePage> | ||
<S.Date>{walkData.date}</S.Date> | ||
|
||
<S.Title> | ||
견주닉넴과 밤톨이가 | ||
<br /> | ||
<span>30분</span>동안 산책했어요. | ||
</S.Title> | ||
<S.DogImageArea> | ||
<S.DogImage /> | ||
</S.DogImageArea> | ||
|
||
<S.WalkStats> | ||
<S.StatItem> | ||
<S.StatValue className='value'>{walkData.time}</S.StatValue> | ||
<S.StatLabel className='label'>산책 시간</S.StatLabel> | ||
</S.StatItem> | ||
<S.StatItem> | ||
<S.StatValue className='value'>{walkData.distance}</S.StatValue> | ||
<S.StatLabel className='label'>산책 거리</S.StatLabel> | ||
</S.StatItem> | ||
<S.StatItem> | ||
<S.StatValue className='value'>{walkData.calories}</S.StatValue> | ||
<S.StatLabel className='label'>소모한 칼로리</S.StatLabel> | ||
</S.StatItem> | ||
</S.WalkStats> | ||
|
||
<S.MapSection> | ||
<img src={walkData.mapImage} alt='산책 경로' /> | ||
</S.MapSection> | ||
</S.WalkCompletePage> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { styled } from 'styled-components' | ||
import WalkCompleteDog from '~assets/result_dog.svg?react' | ||
import { Box } from '~components/Box' | ||
import { Typo13, Typo17, Typo20 } from '~components/Typo' | ||
import { FOOTER_HEIGHT } from '~constants/layout' | ||
|
||
export const WalkCompletePage = styled.div` | ||
background-color: ${({ theme }) => theme.colors.brand.lighten_3}; | ||
width: 100%; | ||
height: calc(100dvh - ${FOOTER_HEIGHT}px); | ||
padding: 24px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
` | ||
|
||
export const Date = styled(Typo17)` | ||
font-weight: 700; | ||
color: #333; | ||
` | ||
|
||
export const Title = styled(Typo20)` | ||
font-weight: 800; | ||
span { | ||
color: #8b4513; | ||
} | ||
` | ||
|
||
export const WalkStats = styled(Box)` | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 22px 33px; | ||
/* border-radius: 12px; */ | ||
` | ||
|
||
export const StatItem = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 8px; | ||
` | ||
|
||
export const StatValue = styled(Typo20)` | ||
font-weight: 800; | ||
color: ${({ theme }) => theme.colors.grayscale.font_1}; | ||
` | ||
|
||
export const StatLabel = styled(Typo13)` | ||
font-weight: 500; | ||
color: ${({ theme }) => theme.colors.grayscale.font_1}; | ||
` | ||
|
||
export const MapSection = styled.div` | ||
width: 100%; | ||
height: 240px; | ||
border-radius: 12px; | ||
overflow: hidden; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
` | ||
|
||
export const DogImageArea = styled.div` | ||
display: flex; | ||
justify-content: right; | ||
` | ||
|
||
export const DogImage = styled(WalkCompleteDog)` | ||
width: 142px; | ||
height: 151px; | ||
display: flex; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import * as S from './styles' | ||
|
||
interface WalkerListModalProps { | ||
isOpen: boolean | ||
onClose: () => void | ||
isClosing: boolean | ||
} | ||
|
||
export default function WalkerListModal({ isOpen, onClose, isClosing }: WalkerListModalProps) { | ||
if (!isOpen) return null | ||
|
||
const handleBackgroundClick = (e: React.MouseEvent) => { | ||
if (e.target === e.currentTarget) { | ||
onClose() | ||
} | ||
} | ||
|
||
return ( | ||
<S.Overlay className={isClosing ? 'closing' : ''} onClick={handleBackgroundClick}> | ||
<S.WalkerListContainer className={isClosing ? 'closing' : ''}> | ||
<S.ModalTitle>강번따 리스트</S.ModalTitle> | ||
<S.WalkerListSection> | ||
<S.WalkerList> | ||
{Array(10) | ||
.fill(0) | ||
.map((_, i) => ( | ||
<S.WalkerItem key={i}> | ||
<S.ProfileArea> | ||
<S.ProfileCircle /> | ||
<S.InfoArea> | ||
<S.Name>밤돌이</S.Name> | ||
<S.Details> | ||
<S.Detail>포메라니안</S.Detail> | ||
<S.WalkListSeparator $height={8} /> | ||
<S.Detail>4살</S.Detail> | ||
<S.WalkListSeparator $height={8} /> | ||
<S.Detail>남</S.Detail> | ||
</S.Details> | ||
<S.WalkCount> | ||
산책 횟수 <p> 4회</p> | ||
</S.WalkCount> | ||
</S.InfoArea> | ||
</S.ProfileArea> | ||
<S.WalkBtn $type='roundedRect' $bgColor='lighten_3' $fontWeight='700'> | ||
강번따 | ||
</S.WalkBtn> | ||
</S.WalkerItem> | ||
))} | ||
</S.WalkerList> | ||
</S.WalkerListSection> | ||
</S.WalkerListContainer> | ||
</S.Overlay> | ||
) | ||
} |
Oops, something went wrong.