-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT] StagingArea 퍼블리싱 #73
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2010232
feat: TextBtn 클릭 이벤트 추가(전체 <-> 취소 변환)
Kjiw0n 5078df8
refactor: 자주 쓰이지 않는 속성 디폴트 값 적용
Kjiw0n c498f8a
refactor: 임시 버튼 생성된 공통 컴포넌트로 교체
Kjiw0n c59bb1c
feat: ScrollGradient 컴포넌트 추가
Kjiw0n 810f308
fix: px -> rem 단위 변환
Kjiw0n e7a9eb1
refactor: Staging Area의 border 색상 변경
Kjiw0n e173a41
fix: 잘못된 import 수정 및 사용하지 않는 props 제거
Kjiw0n e33f207
refactor: btnType 네이밍 수정
Kjiw0n 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import BtnTask from '@/components/common/BtnTask/BtnTask'; | ||
import ScrollGradient from '@/components/common/ScrollGradient'; | ||
import StagingAreaSetting from '@/components/common/StagingArea/StagingAreaSetting'; | ||
import TextInputStaging from '@/components/common/textbox/TextInputStaging'; | ||
|
||
function StagingArea() { | ||
return ( | ||
<StagingAreaLayout> | ||
<StagingAreaContainer> | ||
<StagingAreaUpContainer> | ||
<StagingAreaTitle>쏟아내기</StagingAreaTitle> | ||
<StagingAreaTaskContainer> | ||
<StagingAreaSetting /> | ||
<BtnTaskContainer> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<BtnTask btnType="staging" /> | ||
<ScrollGradient /> | ||
</BtnTaskContainer> | ||
</StagingAreaTaskContainer> | ||
</StagingAreaUpContainer> | ||
<TextInputStaging /> | ||
</StagingAreaContainer> | ||
</StagingAreaLayout> | ||
); | ||
} | ||
|
||
export default StagingArea; | ||
|
||
const StagingAreaLayout = styled.div` | ||
display: inline-flex; | ||
gap: 0.8rem; | ||
align-items: center; | ||
padding: 0 0.7rem; | ||
|
||
border-right: 1px solid ${({ theme }) => theme.palette.Grey.Grey3}; | ||
border-radius: 0 12px 12px 0; | ||
`; | ||
|
||
const StagingAreaContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: space-between; | ||
height: 76.8rem; | ||
padding-bottom: 2.8rem; | ||
`; | ||
|
||
const StagingAreaUpContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
align-self: stretch; | ||
`; | ||
|
||
const StagingAreaTitle = styled.div` | ||
display: flex; | ||
gap: 0.8rem; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 2.8rem 3.6rem 2.1rem 1.2rem; | ||
${({ theme }) => theme.fontTheme.HEADLINE_02}; | ||
`; | ||
|
||
const StagingAreaTaskContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1.3rem; | ||
align-items: flex-start; | ||
align-self: stretch; | ||
`; | ||
|
||
const BtnTaskContainer = styled.div` | ||
width: 100%; | ||
height: 56.7rem; | ||
overflow: scroll; | ||
`; |
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 styled from '@emotion/styled'; | ||
import { useState } from 'react'; | ||
|
||
import ArrangeBtn from '../arrangeBtn/ArrangeBtn'; | ||
import TextBtn from '../button/textBtn/TextBtn'; | ||
|
||
function StagingAreaSetting() { | ||
const [activeButton, setActiveButton] = useState<'전체' | '취소'>('전체'); | ||
|
||
const handleButtonClick = (button: '전체' | '취소') => { | ||
setActiveButton(button); | ||
}; | ||
|
||
return ( | ||
<StagingAreaSettingLayout> | ||
<TextBtnContainer> | ||
<TextBtn | ||
size="small" | ||
text="전체" | ||
color={activeButton === '전체' ? 'BLUE' : 'WHITE'} | ||
mode={activeButton === '전체' ? 'DEFAULT' : 'LIGHT'} | ||
isHover | ||
isPressed | ||
onClick={() => handleButtonClick('전체')} | ||
/> | ||
<TextBtn | ||
size="small" | ||
text="취소" | ||
color={activeButton === '취소' ? 'BLUE' : 'WHITE'} | ||
mode={activeButton === '취소' ? 'DEFAULT' : 'LIGHT'} | ||
isHover | ||
isPressed | ||
onClick={() => handleButtonClick('취소')} | ||
/> | ||
</TextBtnContainer> | ||
<ArrangeBtn type="set" mode="DISABLED" color="WHITE" size="small" /> | ||
</StagingAreaSettingLayout> | ||
); | ||
} | ||
|
||
export default StagingAreaSetting; | ||
|
||
const StagingAreaSettingLayout = styled.div` | ||
display: flex; | ||
align-items: center; | ||
align-self: stretch; | ||
justify-content: space-between; | ||
`; | ||
|
||
const TextBtnContainer = styled.div` | ||
display: flex; | ||
gap: 0.4rem; | ||
align-items: center; | ||
padding-left: 0.4rem; | ||
`; |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import BtnStagingDate from '../BtnDate/BtnStagingDate'; | ||
import EnterBtn from '../button/EnterBtn'; | ||
|
||
function TextInputStaging() { | ||
return ( | ||
<StagingLayout> | ||
<TextArea placeholder="해야하는 일들을 쏟아내보세요." /> | ||
<BtnWrapper> | ||
<TmpBtn /> | ||
<TmpBtn /> | ||
<BtnStagingDate /> | ||
<EnterBtn /> | ||
</BtnWrapper> | ||
</StagingLayout> | ||
); | ||
|
@@ -34,6 +37,7 @@ const TextArea = styled.textarea` | |
&:focus { | ||
outline: none; | ||
} | ||
resize: none; | ||
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. 헤헤 감사합니당 |
||
`; | ||
|
||
const BtnWrapper = styled.div` | ||
|
@@ -44,11 +48,4 @@ const BtnWrapper = styled.div` | |
height: fit-content; | ||
`; | ||
|
||
/** 임시 버튼 */ | ||
const TmpBtn = styled.div` | ||
width: 5rem; | ||
height: 2.2rem; | ||
|
||
background-color: ${({ theme }) => theme.palette.Grey.Grey6}; | ||
`; | ||
export default TextInputStaging; |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ export interface TextBtnType { | |
text: string; | ||
isHover: boolean; | ||
isPressed: boolean; | ||
onClick?: () => void; | ||
} |
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.
여길 이렇게 써보는 방식은 어떨까요 ??
반복되는 코드들도 사라지고
handleButtonClick
도 사라져도 되니 더 깔끔할 것 같습니다!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.
헉 짱짱 바로 반영할게요
map
을 생각을 못했다!!