summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-09-27 23:14:58 -0400
committerKit La Touche <kit@transneptune.net>2024-09-27 23:14:58 -0400
commitc524b333befc8cc97aa49f73b3ed28bc3b82420c (patch)
tree451bf50d616c2aac70b5a1b15c453411fdb61184
parentb892bd9fdba5fe9397f3c4432b3039aa961b7a14 (diff)
Make message input tolerable as mock-up
It's not robust, and it's not yet able to handle multiline or rich input. We'll get there.
-rw-r--r--hi-ui/src/lib/MessageInput.svelte8
1 files changed, 8 insertions, 0 deletions
diff --git a/hi-ui/src/lib/MessageInput.svelte b/hi-ui/src/lib/MessageInput.svelte
index 7896da6..4bb4aab 100644
--- a/hi-ui/src/lib/MessageInput.svelte
+++ b/hi-ui/src/lib/MessageInput.svelte
@@ -1,12 +1,20 @@
<script>
+ let input;
+ let disabled = false;
+
function handleSubmit(event) {
console.log(event);
}
</script>
<form on:submit={handleSubmit}>
+ <input type="text" class="border rounded px-3" bind:value={input} disabled={disabled}>
<button type="submit">➤</button>
</form>
<style>
+ input[type="text"] {
+ /* TODO: percentage won't handle zoom in/out well. */
+ width: 96%;
+ }
</style>