-
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.
π Design: λκΈ μ»΄ν¬λνΈ μμ±, κΈ°ν λ°λ³΅ μμ΄ν
μ»΄ν¬λνΈ νμ λ§μΆμ΄ μμ (#28)
- Loading branch information
Showing
9 changed files
with
253 additions
and
28 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
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,83 @@ | ||
/* _replyItem.scss */ | ||
|
||
.reply-item { | ||
display: flex; | ||
gap: 0.8rem; | ||
|
||
&:has(input:checked) { | ||
> .reply-item-body { | ||
background-color: rgb(var(--clr-tint-20) / 0.05); | ||
outline: 0.2rem solid rgb(var(--clr-info) / 0.25); | ||
} | ||
} | ||
} | ||
|
||
.reply-item-checkbox-wrapper { | ||
display: flex; | ||
align-items: center; | ||
flex-shrink: 0; | ||
height: 2.8rem; | ||
} | ||
|
||
.reply-item-body { | ||
flex: 1; | ||
display: flex; | ||
flex-flow: column nowrap; | ||
gap: 0.4rem; | ||
padding: 0.8rem; | ||
border-radius: var(--rad-lg); | ||
} | ||
|
||
.reply-item-user { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.reply-item-user-controls { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.4rem; | ||
margin-inline-start: auto; | ||
} | ||
|
||
.reply-content-wrapper { | ||
display: flex; | ||
gap: 0.4rem; | ||
} | ||
|
||
.reply-depth-indicator { | ||
flex-shrink: 0; | ||
width: 1.2rem; | ||
|
||
&::before { | ||
display: block; | ||
margin-inline-start: auto; | ||
width: 55%; | ||
height: 0.5rem; | ||
border-bottom-left-radius: var(--rad-sm); | ||
border-block-end: 1px solid rgb(var(--clr-text) / 0.25); | ||
border-inline-start: 1px solid rgb(var(--clr-text) / 0.25); | ||
content: ''; | ||
} | ||
} | ||
|
||
.reply-content-container { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
gap: 0.4rem; | ||
} | ||
|
||
.reply-content-text { | ||
line-height: 1.4; | ||
} | ||
|
||
.reply-item-datetime { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.4rem; | ||
font-size: var(--fnt-sm); | ||
font-weight: 200; | ||
opacity: 0.5rem; | ||
} | ||
|
||
/* _replyItem.scss */ |
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
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,59 @@ | ||
import dateFormat from '../../utils/dateFormat'; | ||
import hourFormat from '../../utils/hourFormat'; | ||
import NameTag from './NameTag'; | ||
import Remix from './Remix'; | ||
|
||
const ReplyItem = ({ | ||
index = 0, | ||
userObject = { userID: 0, userImage: null, userName: 'νκΈΈλ' }, | ||
replyContent = 'μμ±λ λ΄μ©μ΄ μμ΄μ.', | ||
writtenDateTime = '1970-01-01', | ||
isMyReply = false, | ||
isEditMode = false, | ||
}) => { | ||
return ( | ||
<article className="reply-item"> | ||
{isEditMode && ( | ||
<div className="reply-item-checkbox-wrapper"> | ||
<input type="checkbox" id={`chkReplyItem${index}`} /> | ||
|
||
<label htmlFor={`chkReplyItem${index}`}> | ||
<div className="toggles-indicator"> | ||
<Remix iconName={'check-line'} iconSize={0.6} /> | ||
</div> | ||
</label> | ||
</div> | ||
)} | ||
|
||
<div className="reply-item-body"> | ||
<div className="reply-item-user"> | ||
<NameTag userObject={userObject} /> | ||
|
||
{isMyReply && ( | ||
<div className="reply-item-user-controls"> | ||
<span>μμ </span> | ||
<span>Β·</span> | ||
<span>μμ </span> | ||
</div> | ||
)} | ||
</div> | ||
|
||
<div className="reply-content-wrapper"> | ||
<div className="reply-depth-indicator"></div> | ||
|
||
<div className="reply-content-container"> | ||
<div className="reply-content-text">{replyContent}</div> | ||
|
||
<div className="reply-item-datetime"> | ||
<span>{dateFormat(writtenDateTime)}</span> | ||
<span>Β·</span> | ||
<span>{hourFormat(writtenDateTime)}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</article> | ||
); | ||
}; | ||
|
||
export default ReplyItem; |
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