-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 계획표 화면으로 라우터 추가 * feat: 아이콘 이미지 asset 추가 * fix: 계획 페이지 라우터 변경 * fix: 계획표 페이지 페이지 컴포넌트 수정 * feat: 꿈틀나무 페이지 UI 구현 * feat: 뒤로가기 버튼 UI 구현 * fix: 꿈틀나무 UI 수정 * feat: 계획 수정 페이지 UI 구현 --------- Co-authored-by: jwoo08 <[email protected]>
- Loading branch information
Showing
23 changed files
with
581 additions
and
40 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ export const ModalBackdrop = styled.div` | |
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
z-index: 1000; | ||
`; |
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,41 @@ | ||
import styled from 'styled-components'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
export const BackBtn = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClickBtn = () => { | ||
navigate('/home'); | ||
}; | ||
|
||
return ( | ||
<BackButton onClick={handleClickBtn}> | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/leftarrow_icon.svg'} | ||
alt="뒤로가기" | ||
/> | ||
</BackButton> | ||
); | ||
}; | ||
|
||
const BackButton = styled.button` | ||
position: absolute; | ||
top: 30px; | ||
left: 30px; | ||
width: 28px; | ||
height: 28px; | ||
border-radius: 50%; | ||
border: none; | ||
background-color: ${({ theme }) => theme.colors.green}; | ||
z-index: 300; | ||
img { | ||
width: 22px; | ||
height: 22px; | ||
} | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
`; |
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
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,101 @@ | ||
import styled from 'styled-components'; | ||
|
||
enum PlanView { | ||
Image = 'Image', | ||
Graph = 'Graph', | ||
} | ||
interface ViewToggleProps { | ||
view: PlanView; | ||
setView: React.Dispatch<React.SetStateAction<PlanView>>; | ||
} | ||
export const ViewToggle = ({ view, setView }: ViewToggleProps) => { | ||
const handleClickToggleBtn = () => { | ||
if (view === PlanView.Image) setView(PlanView.Graph); | ||
else setView(PlanView.Image); | ||
}; | ||
return ( | ||
<ViewToggleContainer> | ||
<ToggleBtn | ||
className={view === PlanView.Image ? 'selected' : ''} | ||
onClick={handleClickToggleBtn} | ||
> | ||
{view === PlanView.Image ? ( | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/apple_icon_selected.svg'} | ||
alt="꿈틀나무" | ||
/> | ||
) : ( | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/apple_icon.svg'} | ||
alt="꿈틀나무" | ||
/> | ||
)} | ||
꿈틀나무 | ||
</ToggleBtn> | ||
<ToggleBtn | ||
className={view === PlanView.Graph ? 'selected' : ''} | ||
onClick={handleClickToggleBtn} | ||
> | ||
{view === PlanView.Graph ? ( | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/pen_icon_selected.svg'} | ||
alt="만다라트" | ||
/> | ||
) : ( | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/pen_icon.svg'} | ||
alt="만다라트" | ||
/> | ||
)} | ||
만다라트 | ||
</ToggleBtn> | ||
</ViewToggleContainer> | ||
); | ||
}; | ||
|
||
const ViewToggleContainer = styled.div` | ||
position: absolute; | ||
top: 28px; | ||
left: 50%; | ||
transform: translate(-50%, 0); | ||
z-index: 300; | ||
width: 140px; | ||
height: 32px; | ||
padding: 4px; | ||
border-radius: 8px; | ||
background-color: ${({ theme }) => theme.colors.gray_300}; | ||
display: flex; | ||
justify-content: space-between; | ||
`; | ||
|
||
const ToggleBtn = styled.button` | ||
width: 64px; | ||
height: 24px; | ||
border-radius: 4px; | ||
padding: 0; | ||
border: none; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-family: 'PretendardMedium'; | ||
font-size: 12px; | ||
background-color: ${({ theme }) => theme.colors.gray_300}; | ||
color: ${({ theme }) => theme.colors.gray_600}; | ||
&.selected { | ||
background-color: white; | ||
color: ${({ theme }) => theme.colors.green}; | ||
box-shadow: 1px 1px 8px 0px #d9d9d9; | ||
} | ||
img { | ||
width: 12px; | ||
height: 12px; | ||
margin-right: 2px; | ||
} | ||
transition: background-color 0.1s ease; | ||
`; |
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,102 @@ | ||
import styled from 'styled-components'; | ||
import { Modal } from '@components/common/Modal'; | ||
import { ModalHeader, HeaderContent, CloseBtn } from './EditModal'; | ||
|
||
interface DoneModalProps { | ||
isOpenModal: boolean; | ||
setIsOpenModal: React.Dispatch<React.SetStateAction<boolean>>; | ||
plan: string; | ||
} | ||
export const DoneModal = ({ | ||
isOpenModal, | ||
setIsOpenModal, | ||
plan, | ||
}: DoneModalProps) => { | ||
return ( | ||
<Modal | ||
width="320px" | ||
height="200px" | ||
padding="16px 24px" | ||
isOpenModal={isOpenModal} | ||
setIsOpenModal={setIsOpenModal} | ||
> | ||
<DoneModalContainer> | ||
<ModalHeader> | ||
<HeaderContent>목표 완료</HeaderContent> | ||
<CloseBtn | ||
onClick={() => { | ||
setIsOpenModal(false); | ||
}} | ||
> | ||
<img | ||
src={import.meta.env.BASE_URL + './icon/close_icon.svg'} | ||
alt="닫기" | ||
/> | ||
</CloseBtn> | ||
</ModalHeader> | ||
<PlanContent> | ||
<PlanText>"{plan}"</PlanText> | ||
<GuideText>목표를 완료하셨나요?</GuideText> | ||
</PlanContent> | ||
<BottomBtnContainer> | ||
<CancelBtn>아직이에요</CancelBtn> | ||
<DoneBtn>완료했어요</DoneBtn> | ||
</BottomBtnContainer> | ||
</DoneModalContainer> | ||
</Modal> | ||
); | ||
}; | ||
|
||
const DoneModalContainer = styled.div``; | ||
|
||
const PlanContent = styled.div` | ||
width: 100%; | ||
height: 100px; | ||
margin: 8px 0; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-evenly; | ||
`; | ||
|
||
const PlanText = styled.div` | ||
width: 100%; | ||
font-family: 'Pretendard'; | ||
color: ${({ theme }) => theme.colors.green}; | ||
text-align: center; | ||
`; | ||
const GuideText = styled.div` | ||
width: 100%; | ||
text-align: center; | ||
font-family: 'PretendardMedium'; | ||
font-size: 12px; | ||
color: ${({ theme }) => theme.colors.gray_900}; | ||
`; | ||
|
||
const BottomBtnContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
`; | ||
|
||
const BottomBtn = styled.button` | ||
width: 132px; | ||
height: 28px; | ||
border-radius: 4px; | ||
border: none; | ||
padding: 0; | ||
font-family: 'Pretendard'; | ||
font-size: 11px; | ||
`; | ||
|
||
export const CancelBtn = styled(BottomBtn)` | ||
background-color: white; | ||
border: 1px solid ${({ theme }) => theme.colors.green}; | ||
color: ${({ theme }) => theme.colors.green}; | ||
`; | ||
|
||
export const DoneBtn = styled(BottomBtn)` | ||
background-color: ${({ theme }) => theme.colors.green}; | ||
color: white; | ||
`; |
Oops, something went wrong.