-
Notifications
You must be signed in to change notification settings - Fork 5
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] 전체 참여자 BottomSheet 내부 디자인 퍼블리싱 #228
Changes from all commits
42c5bba
0f58f6e
ad03fd9
0b1a2e2
468d7ee
aa34237
4288514
1c9a2f0
9ffc763
9ac9410
51efadf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {css} from '@emotion/react'; | ||
|
||
export const InputAndDeleteButtonContainer = () => | ||
css({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
width: '100%', | ||
gap: '1rem', | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {Icon, IconButton, LabelGroupInput} from 'haengdong-design'; | ||
|
||
import {InputAndDeleteButtonContainer} from './InputAndDeleteButton.style'; | ||
|
||
const InputAndDeleteButton = () => { | ||
return ( | ||
<div css={InputAndDeleteButtonContainer}> | ||
<div css={{flexGrow: 1}}> | ||
<LabelGroupInput.Element elementKey="e" /> | ||
</div> | ||
<IconButton variants="tertiary" size="medium"> | ||
<Icon iconType="trash" iconColor="onTertiary" /> | ||
</IconButton> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InputAndDeleteButton; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import {SetAllMemberListModal, SetInitialMemberListModal, SetActionListModal} from '@components/Modal/index'; | ||
|
||
interface ModalBasedOnMemberCountProps { | ||
memberNameList: string[]; | ||
isOpenBottomSheet: boolean; | ||
isOpenAllMemberListButton: boolean; | ||
setOrder: React.Dispatch<React.SetStateAction<number>>; | ||
setIsOpenBottomSheet: React.Dispatch<React.SetStateAction<boolean>>; | ||
setIsOpenAllMemberListButton: React.Dispatch<React.SetStateAction<boolean>>; | ||
} | ||
|
||
const ModalBasedOnMemberCount = ({ | ||
memberNameList, | ||
isOpenBottomSheet, | ||
isOpenAllMemberListButton, | ||
setOrder, | ||
setIsOpenBottomSheet, | ||
setIsOpenAllMemberListButton, | ||
}: ModalBasedOnMemberCountProps) => { | ||
if (isOpenAllMemberListButton) { | ||
return ( | ||
<SetAllMemberListModal | ||
setIsOpenBottomSheet={setIsOpenBottomSheet} | ||
isOpenBottomSheet={isOpenBottomSheet} | ||
setIsOpenAllMemberListButton={setIsOpenAllMemberListButton} | ||
/> | ||
); | ||
} | ||
switch (memberNameList.length) { | ||
case 0: | ||
return ( | ||
<SetInitialMemberListModal setIsOpenBottomSheet={setIsOpenBottomSheet} isOpenBottomSheet={isOpenBottomSheet} /> | ||
); | ||
|
||
default: | ||
return ( | ||
<SetActionListModal | ||
setOrder={setOrder} | ||
setIsOpenBottomSheet={setIsOpenBottomSheet} | ||
isOpenBottomSheet={isOpenBottomSheet} | ||
/> | ||
); | ||
} | ||
}; | ||
|
||
export default ModalBasedOnMemberCount; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {css} from '@emotion/react'; | ||
|
||
export const allMemberListModalStyle = () => | ||
css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '1rem', | ||
width: '100%', | ||
height: '100%', | ||
}); | ||
|
||
export const allMemberListModalTitleStyle = () => | ||
css({ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
width: '100%', | ||
padding: '0 1.5rem', | ||
}); | ||
|
||
export const allMemberListModalLabelGroupInputStyle = () => | ||
css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
padding: '0 1rem', | ||
paddingBottom: '10rem', | ||
|
||
overflow: 'auto', | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import {BottomSheet, Text, LabelGroupInput, FixedButton} from 'haengdong-design'; | ||
|
||
import InputAndDeleteButton from '@components/InputAndDeleteButton/InputAndDeleteButton'; | ||
|
||
import { | ||
allMemberListModalLabelGroupInputStyle, | ||
allMemberListModalStyle, | ||
allMemberListModalTitleStyle, | ||
} from './SetAllMemberListModal.style'; | ||
|
||
interface SetAllMemberListModalProps { | ||
isOpenBottomSheet: boolean; | ||
setIsOpenBottomSheet: React.Dispatch<React.SetStateAction<boolean>>; | ||
setIsOpenAllMemberListButton: React.Dispatch<React.SetStateAction<boolean>>; | ||
} | ||
|
||
const SetAllMemberListModal = ({ | ||
isOpenBottomSheet, | ||
setIsOpenBottomSheet, | ||
setIsOpenAllMemberListButton, | ||
}: SetAllMemberListModalProps) => { | ||
const handleCloseAllMemberListModal = () => { | ||
setIsOpenAllMemberListButton(prev => !prev); | ||
setIsOpenBottomSheet(false); | ||
}; | ||
|
||
return ( | ||
<BottomSheet isOpened={isOpenBottomSheet} onClose={handleCloseAllMemberListModal}> | ||
<div css={allMemberListModalStyle}> | ||
<div css={allMemberListModalTitleStyle}> | ||
<Text size="bodyBold">전체 참여자 수정하기</Text> | ||
{/* TODO: (@soha): 인원 텍스트 색 수정 필요 */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 빠르게 반영해서 노티드릴게요 ㅜㅜㅜㅜㅜ |
||
<Text size="bodyBold" color="sematic"> | ||
총 N명 | ||
</Text> | ||
</div> | ||
<div css={allMemberListModalLabelGroupInputStyle}> | ||
<LabelGroupInput labelText="이름"> | ||
<InputAndDeleteButton /> | ||
</LabelGroupInput> | ||
</div> | ||
<FixedButton children="수정 완료" /> | ||
</div> | ||
</BottomSheet> | ||
); | ||
}; | ||
|
||
export default SetAllMemberListModal; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export {default as SetActionListModal} from './SetActionModal/SetActionListModal'; | ||
export {default as SetInitialMemberListModal} from './SetInitialMemberListModal/SetInitialMemberListModal'; | ||
export {default as SetAllMemberListModal} from './SetAllMemberListModal/SetAllMemberListModal'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import {css} from '@emotion/react'; | ||
|
||
export const ReceiptStyle = () => | ||
export const receiptStyle = () => | ||
css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '8px', | ||
padding: '0 8px', | ||
paddingBottom: '8.75rem', | ||
}); | ||
|
||
export const titleAndListButtonContainerStyle = () => | ||
css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}); | ||
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jinhokim98 : 이부분은 Flex component를 사용할 수 있지 않을까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 해당 부분은 Flex를 사용할 수가 없습니댱! |
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.
좋은 방법이네요! 축약하지 않으려고 길게 작성하게 되었는데.. 위 방법이 축약하지도 않고 좋네요!