-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 초대하기를 링크 공유와 카카오톡을 선택할 수 있도록 변경 (#719)
* feat: 공유버튼 모바일과 데탑 분리 * feat: 송금버튼 새로운 반영사항 적용 * feat: 계좌번호 없을 때 금액 복사 기능 추가 * test: prop 변경으로 인한 스토리북 변경 * feat: 계좌번호 없을 때 금액 복사되는 onCopy 추가 * feat: 다나까 -> 요 체로 변경 * feat: 송금기능 페이지 이동으로 인해 memberId 추가 * feat: 송금 페이지 라우트 * feat: 송금하기 버튼을 눌렀을 때 navigate state로 정보 전달 * feat: 송금 방법(복사, 카카오페이, 토스) 제공 * feat: 아래 => 토스열기 명시적으로 변경 * feat: Banner 컴포넌트 생성 * feat: 세션스토리지 util 추가 * feat: 계좌번호 입력 유도 기능 구현 * feat: Flex div prop도 받도록 설정 * feat: 돌아가는 Chevron 컴포넌트 생성 * feat: 바깥 클릭 시 실행되는 컴포넌트 생성 * feat: Select 컴포넌트 제작 * feat: 요구사항 변경으로 인한 송금 플로우 변경 * feat: Select 컴포넌트 제작 * design: 텍스트 색깔 변경 * style: export 정리 * refactor: ClickOutsideDetector 사용 * feat: dropdown base 미트볼, 버튼 두 개 지원 * style: dropdown list z-index 추가 * feat: 드랍다운 버튼을 클릭할 때 드랍다운 리스트가 닫히는 기능 구현 * feat: 모바일에서 링크 초대와 카카오톡 초대 분리 * feat: 공유 메시지 변경
- Loading branch information
1 parent
38da5a1
commit 158bd62
Showing
13 changed files
with
225 additions
and
149 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
client/src/components/Design/components/Dropdown/ButtonBase.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,38 @@ | ||
/** @jsxImportSource @emotion/react */ | ||
import {useTheme} from '@components/Design/theme/HDesignProvider'; | ||
|
||
import Button from '../Button/Button'; | ||
import Flex from '../Flex/Flex'; | ||
|
||
import {dropdownButtonBaseStyle} from './Dropdown.style'; | ||
import {DropdownProps} from './Dropdown.type'; | ||
import DropdownButton from './DropdownButton'; | ||
|
||
type ButtonBaseProps = DropdownProps & { | ||
isOpen: boolean; | ||
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>; | ||
dropdownRef: React.RefObject<HTMLElement>; | ||
}; | ||
|
||
const ButtonBase = ({isOpen, setIsOpen, dropdownRef, baseButtonText, children}: ButtonBaseProps) => { | ||
const {theme} = useTheme(); | ||
|
||
return ( | ||
<> | ||
<Button variants="tertiary" size="small" onClick={() => setIsOpen(true)}> | ||
{baseButtonText} | ||
</Button> | ||
{isOpen && ( | ||
<section ref={dropdownRef}> | ||
<Flex {...dropdownButtonBaseStyle(theme)}> | ||
{children.map((button, index) => ( | ||
<DropdownButton key={index} setIsOpen={setIsOpen} {...button.props} /> | ||
))} | ||
</Flex> | ||
</section> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default ButtonBase; |
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: 23 additions & 25 deletions
48
client/src/components/Design/components/Dropdown/Dropdown.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
5 changes: 5 additions & 0 deletions
5
client/src/components/Design/components/Dropdown/Dropdown.type.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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
export type DropdownBase = 'meatballs' | 'button'; | ||
|
||
export type DropdownButtonProps = React.HTMLAttributes<HTMLButtonElement> & { | ||
text: string; | ||
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>; // 내부에서 사용하기 위한 props 외부에서 넣어주지 말 것 | ||
}; | ||
|
||
export type DropdownProps = { | ||
base?: DropdownBase; | ||
baseButtonText?: string; | ||
children: React.ReactElement<DropdownButtonProps>[]; | ||
}; |
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
39 changes: 39 additions & 0 deletions
39
client/src/components/Design/components/Dropdown/MeatballBase.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,39 @@ | ||
/** @jsxImportSource @emotion/react */ | ||
import {useTheme} from '@components/Design/theme/HDesignProvider'; | ||
|
||
import Flex from '../Flex/Flex'; | ||
import Icon from '../Icon/Icon'; | ||
import IconButton from '../IconButton/IconButton'; | ||
|
||
import {dropdownStyle} from './Dropdown.style'; | ||
import {DropdownProps} from './Dropdown.type'; | ||
import DropdownButton from './DropdownButton'; | ||
|
||
type MeatballBaseProps = DropdownProps & { | ||
isOpen: boolean; | ||
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>; | ||
dropdownRef: React.RefObject<HTMLElement>; | ||
}; | ||
|
||
const MeatballBase = ({isOpen, setIsOpen, dropdownRef, children}: MeatballBaseProps) => { | ||
const {theme} = useTheme(); | ||
|
||
return ( | ||
<> | ||
<IconButton variants="none" onClick={() => setIsOpen(true)}> | ||
<Icon iconType="meatballs" /> | ||
</IconButton> | ||
{isOpen && ( | ||
<section ref={dropdownRef}> | ||
<Flex {...dropdownStyle(theme)}> | ||
{children.map((button, index) => ( | ||
<DropdownButton key={index} setIsOpen={setIsOpen} {...button.props} /> | ||
))} | ||
</Flex> | ||
</section> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default MeatballBase; |
31 changes: 4 additions & 27 deletions
31
client/src/components/Design/components/Dropdown/useDropdown.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
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
33 changes: 14 additions & 19 deletions
33
client/src/components/ShareEventButton/DesktopShareEventButton.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
Oops, something went wrong.