-
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.
Change-Id: I4d1a03063907920d80c30f48c907f0b70b6e206e
- Loading branch information
1 parent
941cf86
commit b40f01f
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
frontend/src/pages/Bucket/BucketDetail/Comment/CommentInput.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,27 @@ | ||
import { ChangeEvent, useState } from 'react' | ||
|
||
const CommentInput = () => { | ||
const [commentText, setCommentText] = useState('') | ||
const handleCommentChange = (event: ChangeEvent<HTMLInputElement>) => { | ||
const text = event.currentTarget.value | ||
setCommentText(text) | ||
} | ||
|
||
return ( | ||
<div className="fixed bottom-0 flex w-full px-6 py-3 bg-white border-t-[1px] border-gray"> | ||
<img src="/public/defaultProfile.svg" /> | ||
<input | ||
type="text" | ||
placeholder="댓글 입력하기..." | ||
value={commentText} | ||
onChange={handleCommentChange} | ||
className="px-3 grow focus:outline-none" | ||
/> | ||
<button type="button" className={`${commentText ? 'text-point1' : 'text-gray'}`}> | ||
등록 | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
export default CommentInput |
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