diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-07-08 19:57:50 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-07-08 19:57:50 -0400 |
| commit | 3b32644d2f30170bdf949dffaea79cde4d4ec647 (patch) | |
| tree | 5259f8aa0f5f864574dfb0d04e64b7bb2c3b9cbf | |
| parent | c631c8fc855b1854f14fc7fbf1d8afedaa37a0db (diff) | |
Create swatch for the `MessageInput` component.
| -rw-r--r-- | ui/routes/(swatch)/.swatch/+page.svelte | 1 | ||||
| -rw-r--r-- | ui/routes/(swatch)/.swatch/MessageInput/+page.svelte | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/ui/routes/(swatch)/.swatch/+page.svelte b/ui/routes/(swatch)/.swatch/+page.svelte index abcb53f..db02fc3 100644 --- a/ui/routes/(swatch)/.swatch/+page.svelte +++ b/ui/routes/(swatch)/.swatch/+page.svelte @@ -8,5 +8,6 @@ <h2>components</h2> <ul> + <li><a href="MessageInput">MessageInput</a></li> <li><a href="swatch/EventLog">swatch/EventLog</a></li> </ul> diff --git a/ui/routes/(swatch)/.swatch/MessageInput/+page.svelte b/ui/routes/(swatch)/.swatch/MessageInput/+page.svelte new file mode 100644 index 0000000..b1d5864 --- /dev/null +++ b/ui/routes/(swatch)/.swatch/MessageInput/+page.svelte @@ -0,0 +1,23 @@ +<script> + import EventCapture from '$lib/swatch/event-capture.svelte.js'; + + import MessageInput from '$lib/components/MessageInput.svelte'; + import EventLog from '$lib/components/swatch/EventLog.svelte'; + + let capture = $state(new EventCapture()); + const sendMessage = capture.on('sendMessage'); +</script> + +<h1><code>MessageInput</code></h1> + +<nav><p><a href=".">Back to swatches</a></p></nav> + +<h2>rendered</h2> + +<div class="component-preview"> + <MessageInput {sendMessage} /> +</div> + +<h2>events</h2> + +<EventLog events={capture.events} clear={capture.clear.bind(capture)} /> |
