Files
CT/src/Views/Chat/messageComposer.tsx
T

27 lines
702 B
TypeScript
Raw Normal View History

2024-07-07 22:11:18 +02:00
import * as React from "bloatless-react";
2024-07-11 01:24:06 +02:00
import { Chat } from "../../Model/chatModel";
import { translation } from "../../translations";
2024-07-07 22:11:18 +02:00
2024-07-09 14:28:13 +02:00
export function MessageComposer(chat: Chat) {
return (
<div class="flex-row width-100">
{" "}
<input
class="width-100 flex-1"
style="max-width: unset"
placeholder={translation.composerPlaceholder}
bind:value={chat.composingMessage}
2024-07-11 00:47:58 +02:00
on:enter={chat.sendMessageFromComposer}
2024-07-09 14:28:13 +02:00
></input>
<button
class="primary"
2024-07-11 00:47:58 +02:00
on:click={chat.sendMessageFromComposer}
2024-07-09 14:28:13 +02:00
toggle:disabled={chat.cannotSendMessage}
>
<span class="icon">send</span>
</button>
</div>
);
2024-07-07 22:11:18 +02:00
}