-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 하루 일정 모달 UI 구현 * feat: 하루 일정 조회 API 구현 * feat: 날짜와 하루 일정 모달 연결 * feat: 하루 일정 모달과 일정 조회 모달 연결 * refactor: 하루 일정 모달 이름 변경 * refactor: 리뷰반영 * refactor: 오타 수정 * refactor: 상태 이름 수정 및 rebase 충돌 해결 * refactor: day -> daily로 이름 변경
- Loading branch information
1 parent
0a909db
commit 5a821ec
Showing
11 changed files
with
335 additions
and
20 deletions.
There are no files selected for viewing
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
48 changes: 48 additions & 0 deletions
48
frontend/src/components/DailyScheduleModal/DailyScheduleModal.stories.tsx
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,48 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import DailyScheduleModal from '~/components/DailyScheduleModal/DailyScheduleModal'; | ||
import Button from '~/components/common/Button/Button'; | ||
import { useModal } from '~/hooks/useModal'; | ||
import type { SchedulePosition } from '~/types/schedule'; | ||
|
||
const meta = { | ||
title: 'DailyScheduleModal', | ||
component: DailyScheduleModal, | ||
} satisfies Meta<typeof DailyScheduleModal>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
render: () => { | ||
const { openModal } = useModal(); | ||
|
||
return ( | ||
<> | ||
<Button onClick={openModal}>모달 열기</Button> | ||
<DailyScheduleModal | ||
onSetModalType={() => console.log('hi')} | ||
rawDate={new Date()} | ||
position={{ row: 0, column: 0 }} | ||
onScheduleModalOpen={({ scheduleId, row, column, level }) => | ||
alert(`${scheduleId}, ${row}, ${column}, ${level}`) | ||
} | ||
/> | ||
</> | ||
); | ||
}, | ||
args: { | ||
onScheduleModalOpen: ({ | ||
scheduleId, | ||
row, | ||
column, | ||
level, | ||
}: SchedulePosition & { | ||
scheduleId: number; | ||
}) => { | ||
alert(`${scheduleId}, ${row}, ${column}, ${level}`); | ||
}, | ||
onSetModalType: () => alert('hi'), | ||
position: { row: 0, column: 0 }, | ||
rawDate: new Date(), | ||
}, | ||
}; |
85 changes: 85 additions & 0 deletions
85
frontend/src/components/DailyScheduleModal/DailyScheduleModal.styled.ts
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,85 @@ | ||
import { css, styled } from 'styled-components'; | ||
import type { DailyScheduleModalProps } from '~/components/DailyScheduleModal/DailyScheduleModal'; | ||
|
||
export const Backdrop = styled.div` | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
`; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
position: absolute; | ||
flex-direction: column; | ||
z-index: ${({ theme }) => theme.zIndex.MODAL}; | ||
width: 300px; | ||
height: 338px; | ||
padding: 10px 20px 20px 20px; | ||
border-radius: 10px; | ||
background-color: ${({ theme }) => theme.color.WHITE}; | ||
box-shadow: | ||
0 0 1px #1b1d1f33, | ||
0 15px 25px #1b1d1f33, | ||
0 5px 10px #1b1d1f1f; | ||
`; | ||
|
||
export const Header = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
height: 38px; | ||
padding-bottom: 4px; | ||
margin-bottom: 24px; | ||
border-bottom: ${({ theme }) => `1px solid ${theme.color.GRAY300}`}; | ||
`; | ||
|
||
export const ScheduleWrapper = styled.div` | ||
display: flex; | ||
position: relative; | ||
flex-wrap: wrap; | ||
overflow: auto; | ||
width: 100%; | ||
max-height: 80%; | ||
height: auto; | ||
gap: 10px; | ||
`; | ||
|
||
export const ScheduleBox = styled.div<Pick<DailyScheduleModalProps, 'color'>>` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 40px; | ||
background-color: ${({ color }) => color}; | ||
border-radius: 4px; | ||
filter: brightness(1.5); | ||
cursor: pointer; | ||
`; | ||
|
||
export const closeButton = css` | ||
width: 22px; | ||
height: 38px; | ||
padding: 8px 0; | ||
`; | ||
|
||
export const teamName = css` | ||
overflow: hidden; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
max-width: 200px; | ||
`; |
Oops, something went wrong.