-
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: 회원 가입 플로우 퍼블리싱을 통한 공통 컴포넌트 생성 및 수정 (#35)
* feat: 회원 가입 라우팅 설정 * feat: 공통 컴포넌트 반영 * feat:바텀 버튼 공통 컴포넌트 구현 * refactor: 마이페이지에 공통 버튼 컴포넌트 적용 * feat: Header 공통 컴포넌트 생성 * feat: 회원 가입 플로우에 헤더 적용 * chore: 오타 수정 * refactor: 선택지 컴포넌트 분리 * chore: 변수명 변경 * refactor: 마이페이지 공통 컴포넌트 적용 및 상태 리팩토링 * refactor: 공통 컴포넌트 지역 선택 드롭다운 리팩토링 * feat:사용자의 클릭 영억에 따른 기능 추가 * refacotr:중복되는 코드 단축 * feat:네비게이션 설정 * feat:여행자 유형 설정 상태 관리 * feat: 회원가입 플로우 여행자 유형 설정 * chore: 빼먹은 코드 추가 및 불필요한 코드 삭제 * design: 바텀 버튼 레이아웃 수정 * design: 디자인 요소 수정 * feat:context api 생성 * feat: 지역 상태 저장 * feat: 여행자 유형 상태 관리 * fix: 여행자 유형 상태 관리 수정 * feat: 지역 입력 추상화
- Loading branch information
Showing
16 changed files
with
611 additions
and
347 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { COLORS, FONTS } from '@/styles/constants'; | ||
|
||
interface BottomButtonProps { | ||
text: string; | ||
clickedFn: () => void; | ||
disabled?: boolean; | ||
} | ||
|
||
const BottomButton = ({ text, clickedFn, disabled }: BottomButtonProps) => { | ||
return ( | ||
<div css={bottomBtnLayout}> | ||
<button | ||
type="submit" | ||
onClick={clickedFn} | ||
disabled={disabled} | ||
css={bottomBtn(disabled)}> | ||
{text} | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BottomButton; | ||
|
||
const bottomBtnLayout = css` | ||
position: fixed; | ||
bottom: 0; | ||
width: 100%; | ||
padding: 1.2rem 2rem; | ||
`; | ||
|
||
const bottomBtn = (disabled?: boolean) => css` | ||
width: 100%; | ||
padding: 1.7rem 0; | ||
border-radius: 1.2rem; | ||
background-color: ${disabled ? COLORS.gray1 : COLORS.brand1}; | ||
color: ${disabled ? COLORS.gray4 : COLORS.white}; | ||
${FONTS.Body2}; | ||
`; |
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,55 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { COLORS, FONTS } from '@/styles/constants'; | ||
|
||
interface HeaderProps { | ||
title?: string; | ||
leftIcon?: React.FunctionComponent< | ||
React.ComponentProps<'svg'> & { title?: string } | ||
>; | ||
leftFn?: () => void; | ||
rightIcon?: React.FunctionComponent< | ||
React.ComponentProps<'svg'> & { title?: string } | ||
>; | ||
rightFn?: () => void; | ||
} | ||
|
||
const Header = ({ | ||
title, | ||
leftIcon: LeftIcon, | ||
leftFn, | ||
rightIcon: RightIcon, | ||
rightFn, | ||
}: HeaderProps) => { | ||
return ( | ||
<header css={header}> | ||
<div css={leftSide}> | ||
{LeftIcon && <LeftIcon onClick={leftFn} />} | ||
<span>{title}</span> | ||
</div> | ||
{RightIcon && <RightIcon onClick={rightFn} />} | ||
</header> | ||
); | ||
}; | ||
|
||
export default Header; | ||
|
||
const header = css` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
height: 5rem; | ||
padding: 1.2rem 2rem; | ||
`; | ||
|
||
const leftSide = css` | ||
display: flex; | ||
gap: 1rem; | ||
align-items: center; | ||
color: ${COLORS.brand1}; | ||
${FONTS.H4}; | ||
`; |
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
Oops, something went wrong.