-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
146 additions
and
19 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,29 @@ | ||
import { Dispatch, SetStateAction } from "react"; | ||
|
||
type CommentInputProps = { | ||
comment: string; | ||
setComment: Dispatch<SetStateAction<string>>; | ||
onSubmit: () => void; | ||
}; | ||
|
||
const CommentInput = ({ comment, setComment, onSubmit }: CommentInputProps) => { | ||
return ( | ||
<div className="fixed bottom-0 left-0 z-[200] w-full bg-white border-t border-gray-300 px-4 py-4 flex items-center gap-2"> | ||
<input | ||
type="text" | ||
value={comment} | ||
onChange={(e) => setComment(e.target.value)} | ||
placeholder="댓글을 입력하세요" | ||
className="flex-grow border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring focus:ring-blue-300" | ||
/> | ||
<button | ||
onClick={onSubmit} | ||
className="bg-blue-500 text-white rounded-lg px-4 py-2 hover:bg-blue-600" | ||
> | ||
등록 | ||
</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
21 changes: 18 additions & 3 deletions
21
src/frontend/src/components/communityDetail/CommentsList.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
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