-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FE] 하루 일정 모달 구현 #153
Merged
The head ref may contain hidden characters: "feat/fe/\uD558\uB8E8-\uC77C\uC815-\uBAA8\uB2EC-\uAD6C\uD604"
Merged
[FE] 하루 일정 모달 구현 #153
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e872e15
feat: 하루 일정 모달 UI 구현
hafnium1923 23a1318
feat: 하루 일정 조회 API 구현
hafnium1923 d7d0b44
feat: 날짜와 하루 일정 모달 연결
hafnium1923 8f06f65
feat: 하루 일정 모달과 일정 조회 모달 연결
hafnium1923 800c353
refactor: 하루 일정 모달 이름 변경
hafnium1923 2d8ab26
refactor: 리뷰반영
hafnium1923 4a026dc
refactor: 오타 수정
hafnium1923 3b429d1
refactor: 상태 이름 수정 및 rebase 충돌 해결
hafnium1923 ea18952
refactor: day -> daily로 이름 변경
hafnium1923 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 우리가 정했던 코딩 컨벤션에 따르면, 인라인 css 스타일은 항상 사용하지 않는 것으로 결정되었을 거야.
만약 인라인 css 스타일을 사용해야만 하는 불가피한 상황이라면, 따로 회의를 진행해서 정하는 게 필요할 것 같아
물론...원래부터 코드가 이랬다는 건 나도 알고 있어
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
뿌에에에엥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
두 방식 다 안되네 다른 분리 방법 있으면 알려줘