Files
CT/src/Views/Chat/messageComposer.tsx
T
2024-07-11 01:24:06 +02:00

27 lines
702 B
TypeScript

import * as React from "bloatless-react";
import { Chat } from "../../Model/chatModel";
import { translation } from "../../translations";
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}
on:enter={chat.sendMessageFromComposer}
></input>
<button
class="primary"
on:click={chat.sendMessageFromComposer}
toggle:disabled={chat.cannotSendMessage}
>
<span class="icon">send</span>
</button>
</div>
);
}