-
Notifications
You must be signed in to change notification settings - Fork 2
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
[졸업학점계산기] 엑셀 업로더 툴팁 구현 #635
Changes from 2 commits
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 |
---|---|---|
|
@@ -68,13 +68,24 @@ | |
|
||
&__description { | ||
display: flex; | ||
width: 900px; | ||
flex-direction: column; | ||
height: 68px; | ||
border: none; | ||
border-radius: 16px; | ||
background-color: #fff; | ||
font-family: Pretendard, sans-serif; | ||
font-size: 20px; | ||
font-weight: 500; | ||
box-sizing: border-box; | ||
padding: 10px 0 10px 24px; | ||
|
||
&--title { | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: normal; | ||
|
||
& > strong { | ||
color: #3b82f6; | ||
} | ||
} | ||
} | ||
} | ||
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. 구웃...ㅎㅎ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,91 @@ | ||
@use "utils/scss/media.scss" as media; | ||
|
||
.excel-uploader { | ||
position: relative; | ||
display: flex; | ||
width: 403px; | ||
flex-direction: column; | ||
align-items: center; | ||
height: 192px; | ||
border: none; | ||
border-radius: 16px; | ||
background-color: #eee; | ||
padding: 0 12px; | ||
|
||
&__description { | ||
display: flex; | ||
margin-top: 12px; | ||
width: 100%; | ||
justify-content: right; | ||
|
||
& > svg { | ||
width: 30px; | ||
} | ||
} | ||
|
||
&__button { | ||
display: flex; | ||
flex-direction: column; | ||
width: 180px; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 9px 0; | ||
gap: 5px; | ||
|
||
& > svg { | ||
width: 40px; | ||
} | ||
|
||
& > span { | ||
color: #727272; | ||
font-family: Pretendard, sans-serif; | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 500; | ||
} | ||
} | ||
|
||
&__tooltip { | ||
z-index: 10; | ||
position: absolute; | ||
top: -85.5px; | ||
right: -101px; | ||
display: flex; | ||
width: fit-content; | ||
gap: 8px; | ||
border-radius: 8px; | ||
background: #fafafa; | ||
padding: 16px; | ||
box-shadow: 0 1px 4px 0 rgba(0 0 0 / 4%), 0 4px 10px 0 rgba(0 0 0 / 8%); | ||
|
||
&-content { | ||
text-align: left; | ||
color: #1F1F1F; | ||
font-family: Pretendard, sans-serif; | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 160%; | ||
|
||
& > strong { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
&-close { | ||
width: 24px; | ||
height: 24px; | ||
cursor: pointer; | ||
|
||
& > svg > path { | ||
fill: #cacaca; | ||
} | ||
} | ||
|
||
&-asset { | ||
position: absolute; | ||
width: 100%; | ||
margin: 0 auto; | ||
bottom: -13px; | ||
right: -125px; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,55 @@ | ||
/* eslint-disable jsx-a11y/control-has-associated-label */ | ||
import QuestionMarkIcon from 'assets/svg/question-mark-icon.svg'; | ||
import UploadIcon from 'assets/svg/upload-icon.svg'; | ||
import useBooleanState from 'utils/hooks/state/useBooleanState'; | ||
import CloseIcon from 'assets/svg/common/close/close-icon-grey.svg'; | ||
import BubbleTailBottom from 'assets/svg/bubble-tail-bottom.svg'; | ||
import styles from './ExcelUploader.module.scss'; | ||
|
||
function ExcelUploader() { | ||
const [isTooltipOpen, openTooltip, closeTooltip] = useBooleanState(false); | ||
const handleTooltipContent = () => { | ||
openTooltip(); | ||
}; | ||
|
||
const handleTooltipCloseButtonClick = () => { | ||
closeTooltip(); | ||
}; | ||
return ( | ||
<div className={styles['excel-uploader']}> </div> | ||
<div className={styles['excel-uploader']}> | ||
<button | ||
type="button" | ||
onClick={handleTooltipContent} | ||
className={styles['excel-uploader__description']} | ||
> | ||
<QuestionMarkIcon /> | ||
</button> | ||
<button type="submit" className={styles['excel-uploader__button']}> | ||
<UploadIcon /> | ||
<span>엑셀파일 추가하기</span> | ||
</button> | ||
|
||
{isTooltipOpen && ( | ||
<div className={styles['excel-uploader__tooltip']}> | ||
<div className={styles['excel-uploader__tooltip-content']}> | ||
아우누리에서 받은 엑셀 파일을 | ||
<br /> | ||
<strong>드래그&드랍</strong> | ||
하거나 이곳을 | ||
<strong> 클릭해서</strong> | ||
<br /> | ||
경로를 지정해 주세요. | ||
</div> | ||
<button type="button" aria-label="close" className={styles['excel-uploader__tooltip-close']} onClick={handleTooltipCloseButtonClick}> | ||
<CloseIcon /> | ||
</button> | ||
<div className={styles['excel-uploader__tooltip-asset']}> | ||
<BubbleTailBottom /> | ||
</div> | ||
</div> | ||
Comment on lines
+42
to
+49
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. 지금 방법도 좋은데 혹시 이런 방식은 어떤 것 같나요? 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.
혹시 해당 부분을 다시 설명해주실 수 있으신가요..? 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. 네네 그게 제 의도가 맞습니다! |
||
)} | ||
|
||
</div> | ||
); | ||
} | ||
|
||
|
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.
title이 BEM 컨벤션에서의 modifier의 역할을 하는 건가요?
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.
오..! 생각해보니
-title
이 더 맞는것 같아요! 수정했습니다!