-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add starter code for message handling components and enhance sidebar …
…layout
- Loading branch information
1 parent
0b86420
commit 60ca0fc
Showing
9 changed files
with
219 additions
and
3 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,36 @@ | ||
export const Message = () => { | ||
return ( | ||
<> | ||
{/* <div className="chat chat-start"> | ||
<div className="chat-image avatar"> | ||
<div className="w-10 rounded-full"> | ||
<img alt="Reciever avatar" src="https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp" /> | ||
</div> | ||
</div> | ||
<div className="chat-header"> | ||
Bhai | ||
<time className="text-xs opacity-50"> 12:45</time> | ||
</div> | ||
<div className="chat-bubble">You were the Chosen One!</div> | ||
<div className="chat-footer opacity-50">Delivered</div> | ||
</div> */} | ||
|
||
<div className="chat chat-end"> | ||
<div className="chat-image avatar"> | ||
<div className="w-10 rounded-full"> | ||
<img | ||
alt="Sender avatar" | ||
src="./userIcon.jpeg" /> | ||
</div> | ||
</div> | ||
<div className="chat-header"> | ||
Abhiii | ||
<time className="text-xs opacity-50"> 12:46</time> | ||
</div> | ||
<div className="chat-bubble">I Love you ♡ </div> | ||
<div className="chat-footer opacity-50">Seen at 12:46</div> | ||
</div> | ||
</> | ||
) | ||
} |
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,32 @@ | ||
import { IoSend } from "react-icons/io5"; | ||
export const MessageInput = () => { | ||
return ( | ||
<form action="" className="px-4 my-3"> | ||
<div className="w-full"> | ||
<input type="text" className="bordered text-xl rounded-full block w-full p-2.5 bg-gray-700 w-full text-white backdrop-blur-sm opacity-50" placeholder="Type a message..." /> | ||
|
||
<button type="submit" className="absolute inset-y-0 end-0 flex items-center rounded-full bg-pink-900 hover:bg-pink-800 text-white "> | ||
<IoSend /> | ||
</button> | ||
</div> | ||
</form> | ||
) | ||
} | ||
|
||
|
||
// Starter code for frontend/src/components/messageContainer.jsx | ||
|
||
// import { IoSend } from "react-icons/io5"; | ||
// export const MessageInput = () => { | ||
// return ( | ||
// <form action="" className="px-4 my-3"> | ||
// <div className="w-full"> | ||
// <input type="text" className="bordered text-xl rounded-full block w-full p-2.5 bg-gray-700 w-full text-white backdrop-blur-sm opacity-50" placeholder="Type a message..." /> | ||
|
||
// <button type="submit" className="absolute inset-y-0 end-0 flex items-center rounded-full bg-pink-900 hover:bg-pink-800 text-white "> | ||
// <IoSend /> | ||
// </button> | ||
// </div> | ||
// </form> | ||
// ) | ||
// } |
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,21 @@ | ||
import { Message } from "./Message.JSX" | ||
|
||
export const Messages = () => { | ||
return ( | ||
<div className="px-4 flex-1 overflow-auto"> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
<Message /> | ||
</div> | ||
) | ||
} |
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,5 +1,41 @@ | ||
import { MessageInput } from "./MessageInput" | ||
import { Messages } from "./Messages" | ||
|
||
export const MessageContainer = () => { | ||
return ( | ||
<div>messageContainer</div> | ||
<div className="flex flex-col md:min-[450px]: w-full"> | ||
<> | ||
{/* Header */} | ||
<div className="px-4 py-2 bg-gray-800 bg-opacity-50 rounded-t-lg mb-2 w-full"> | ||
<span className="label-text"> To:</span> | ||
<span className="text-gray-200 font-sans text-2xl "> Bhai </span> | ||
</div> | ||
|
||
<Messages /> | ||
<MessageInput /> | ||
</> | ||
</div> | ||
) | ||
} | ||
|
||
|
||
// Starter code for frontend/src/components/messageContainer.jsx | ||
// import { MessageInput } from "./MessageInput" | ||
// import { Messages } from "./Messages" | ||
|
||
// export const MessageContainer = () => { | ||
// return ( | ||
// <div className="flex flex-col md:min-[450px]: w-full"> | ||
// <> | ||
// {/* Header */} | ||
// <div className="px-4 py-2 bg-gray-800 bg-opacity-50 rounded-t-lg mb-2 w-full"> | ||
// <span className="label-text"> To:</span> | ||
// <span className="text-gray-200 font-sans text-2xl "> Bhai </span> | ||
// </div> | ||
|
||
// <Messages /> | ||
// <MessageInput /> | ||
// </> | ||
// </div> | ||
// ) | ||
// } |
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