Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

added send button and styles to chat input component #224

Merged
merged 1 commit into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ const ChatInput = ({
className="chatbox"
placeholder="Enter text to interact with the world here..."
/>
<div
className="chatbox-button"
onClick={(e) => {
e.preventDefault();

if (!!enteredText) {
onSubmit(enteredText);
setEnteredText("");
scrollToBottom();
}
}}
>
SEND
</div>
</form>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,37 @@ input:focus {
cursor: pointer;
text-decoration: none;
}

@keyframes pulse {
from {
text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #eef079, 0 0 20px #eef079,
0 0 25px #eef079, 0 0 30px #eef079, 0 0 35px #eef079;
}
to {
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #eef079,
0 0 40px #eef079, 0 0 50px #eef079, 0 0 60px #eef079, 0 0 70px #eef079;
}
}

.chatbox-button {
color: white;
font-size: 1em;
background-color: gold;
width: 5em;
text-align: center;
padding: 0.5em;
border-radius: 15px;
border-style: double;
border-color: white;
box-shadow: 1px 1px 4px black;
cursor: pointer;
}

.chatbox-button:hover {
animation: pulse 1s infinite;
}

.chatbox-button:active {
animation: pulse 1s infinite;
box-shadow: 0px 0px 0px black;
}