-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/TEAM-BEAT/BEAT-Client in…
…to feat/#438/kakaomap ; Conflicts: ; src/pages/register/Register.tsx
- Loading branch information
Showing
21 changed files
with
769 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#root { | ||
--vh: 100%; | ||
--dvh: 100%; | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
|
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,30 @@ | ||
import Calendar from "react-calendar"; | ||
import "react-calendar/dist/Calendar.css"; | ||
import "./calendar.css"; | ||
interface DatePickerProps { | ||
date: Date | undefined; | ||
onChangeDate: (date: Date) => void; | ||
} | ||
|
||
const DatePicker = ({ date, onChangeDate }: DatePickerProps) => { | ||
const isPastDate = (date) => { | ||
const today = new Date(); | ||
today.setHours(0, 0, 0, 0); | ||
|
||
return date < today; | ||
}; | ||
|
||
return ( | ||
<Calendar | ||
value={date} | ||
onChange={onChangeDate} | ||
calendarType="gregory" | ||
locale="ko-KR" | ||
className="custom-calendar" | ||
formatDay={(_, date) => date.getDate().toString()} | ||
tileClassName={({ date }) => (isPastDate(date) ? "past-date" : "")} | ||
/> | ||
); | ||
}; | ||
|
||
export default DatePicker; |
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,120 @@ | ||
.custom-calendar { | ||
background-color: #2a2a2a; | ||
border: none; | ||
} | ||
|
||
/* navigation 관련 */ | ||
.custom-calendar .react-calendar__navigation { | ||
height: 24px; | ||
margin-bottom: 14px; | ||
|
||
.react-calendar__navigation__label__labelText.react-calendar__navigation__label__labelText--from { | ||
color: #fff; | ||
font-weight: 500; | ||
font-size: 14px; | ||
font-family: Pretendard, sans-serif; | ||
line-height: 20px; | ||
} | ||
|
||
/* label 클릭 할 수 없도록 */ | ||
.react-calendar__navigation__label { | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.custom-calendar .react-calendar__navigation__prev-button, | ||
.custom-calendar .react-calendar__navigation__next-button { | ||
padding-bottom: 2px; | ||
|
||
color: #fff; | ||
|
||
transform: scale(1.1); | ||
} | ||
|
||
.custom-calendar .react-calendar__navigation__prev2-button, | ||
.custom-calendar .react-calendar__navigation__next2-button { | ||
visibility: hidden; | ||
} | ||
|
||
.custom-calendar .react-calendar__navigation__prev-button:hover, | ||
.custom-calendar .react-calendar__navigation__next-button:hover, | ||
.custom-calendar .react-calendar__navigation__prev-button:focus, | ||
.custom-calendar .react-calendar__navigation__next-button:focus { | ||
color: #fff; | ||
|
||
background-color: #2a2a2a !important; | ||
} | ||
|
||
/* month-view 관련 */ | ||
.custom-calendar .react-calendar__month-view__weekdays { | ||
display: grid !important; | ||
grid-template-columns: repeat(7, 32px); | ||
justify-content: center; | ||
margin-bottom: 8px; | ||
|
||
color: #939393; | ||
column-gap: 10.5px; | ||
|
||
/* text */ | ||
abbr { | ||
font-weight: 500; | ||
font-size: 12px; | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
.custom-calendar .react-calendar__month-view__days { | ||
display: grid !important; | ||
grid-template-columns: repeat(7, 32px); | ||
gap: 4px 10.5px; | ||
} | ||
|
||
.custom-calendar .react-calendar__tile { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 32px; | ||
|
||
color: #fff; | ||
font-size: 14px; | ||
|
||
background: #444; | ||
background-color: transparent; | ||
border-radius: 4px; | ||
|
||
:hover { | ||
background-color: transparent; | ||
} | ||
} | ||
|
||
.custom-calendar .react-calendar__tile--now:hover { | ||
color: #fff; | ||
|
||
background-color: #3e3e3e; | ||
} | ||
|
||
.custom-calendar .react-calendar__tile--active { | ||
abbr { | ||
color: black !important; | ||
|
||
background: #fff !important; | ||
} | ||
background: #fff !important; | ||
|
||
:hover { | ||
background-color: transparent !important; | ||
} | ||
} | ||
|
||
.custom-calendar .react-calendar__month-view__days__day--neighboringMonth { | ||
color: #626262; | ||
} | ||
|
||
/* 지난 날짜 색상 */ | ||
.past-date { | ||
color: #939393 !important; | ||
|
||
cursor: not-allowed; | ||
|
||
pointer-events: none; | ||
} |
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
64 changes: 64 additions & 0 deletions
64
src/components/commons/renewTimePicker/RenewTimePicker.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,64 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
display: flex; | ||
gap: 16px; | ||
`; | ||
|
||
export const TimePickerContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
`; | ||
|
||
export const ButtonGroup = styled.div` | ||
display: flex; | ||
gap: 11px; | ||
justify-content: center; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
export const StyledButton = styled.button<{ $isActive: boolean }>` | ||
padding: 6px 50.5px; | ||
${({ theme }) => theme.fonts["body2-normal-medi"]}; | ||
color: ${({ theme, $isActive }) => ($isActive ? theme.colors.black : theme.colors.gray_400)}; | ||
font-weight: 500; | ||
font-size: 13.2px; | ||
background-color: ${({ theme, $isActive }) => ($isActive ? "#fff" : theme.colors.gray_700)}; | ||
border-radius: 100px; | ||
`; | ||
|
||
export const TimeGrid = styled.div` | ||
display: grid; | ||
grid-template-columns: repeat(6, 1fr); | ||
gap: 13.4px; | ||
`; | ||
|
||
export const GridTitle = styled.p` | ||
${({ theme }) => theme.fonts["body2-normal-medi"]}; | ||
font-weight: 500; | ||
&:first-child { | ||
margin-top: 52px; | ||
} | ||
&:last-child { | ||
margin-top: 84px; | ||
} | ||
`; | ||
|
||
export const GridButton = styled.button<{ $isActive: boolean }>` | ||
width: 32px; | ||
height: 32px; | ||
color: ${({ theme, $isActive }) => ($isActive ? theme.colors.black : theme.colors.gray_400)}; | ||
text-align: center; | ||
background-color: ${({ theme, $isActive }) => | ||
$isActive ? theme.colors.white : theme.colors.gray_700}; | ||
cursor: pointer; | ||
border: none; | ||
border-radius: 5px; | ||
`; |
Oops, something went wrong.