From 7b2d114b2444dc4bc66df22675d6dc02b7a8a238 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Tue, 8 Jul 2025 01:06:09 -0400
Subject: Move container divs for components into those components.

The styles for the `MessageInput` and `CreateConversationForm` components assume that the container div will be present, and the components will not render as intended without them. Therefore: they are "part of" the component in most of the ways that matter, not part of the context in which the component is used. Moving the divs into the component will make it easier to reuse these components (for example, in swatches).

The diff for this looks worse than it is because of indentation changes.
---
 ui/lib/components/MessageInput.svelte | 36 ++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

(limited to 'ui/lib/components/MessageInput.svelte')

diff --git a/ui/lib/components/MessageInput.svelte b/ui/lib/components/MessageInput.svelte
index 77c39be..7df4ab2 100644
--- a/ui/lib/components/MessageInput.svelte
+++ b/ui/lib/components/MessageInput.svelte
@@ -45,20 +45,22 @@
   }
 </script>
 
-<form {onsubmit}>
-  <textarea bind:value hidden {disabled}></textarea>
-  <div
-    role="textbox"
-    tabindex="0"
-    contenteditable="plaintext-only"
-    class={{
-      textarea: true,
-      disabled,
-    }}
-    bind:innerText={value}
-    {onkeydown}
-    {onpaste}
-    data-placeholder="Say something..."
-  ></div>
-  <button type="submit">&raquo;</button>
-</form>
+<div class="create-message">
+  <form {onsubmit}>
+    <textarea bind:value hidden {disabled}></textarea>
+    <div
+      role="textbox"
+      tabindex="0"
+      contenteditable="plaintext-only"
+      class={{
+        textarea: true,
+        disabled,
+      }}
+      bind:innerText={value}
+      {onkeydown}
+      {onpaste}
+      data-placeholder="Say something..."
+    ></div>
+    <button type="submit">&raquo;</button>
+  </form>
+</div>
-- 
cgit v1.2.3

