32 lines
839 B
Plaintext
32 lines
839 B
Plaintext
import { Button, Textarea } from "@wrnexus/ui"
|
|
|
|
component MessageComposer {
|
|
props {
|
|
name: string = "text"
|
|
type: string = "message"
|
|
placeholder: string = "Write a message…"
|
|
sendLabel: string = "Send"
|
|
disabled: boolean = false
|
|
color: string = "primary"
|
|
size: string = "md"
|
|
class: string = ""
|
|
}
|
|
|
|
view {
|
|
<form data-room-send class='flex items-end gap-2 {class}'>
|
|
<input type="hidden" name="type" value='{type}' />
|
|
<Textarea
|
|
name='{name}'
|
|
placeholder='{placeholder}'
|
|
rows="2"
|
|
disabled='{disabled}'
|
|
color='{color}'
|
|
size='{size}'
|
|
data-room-reset
|
|
class="min-w-0 flex-1"
|
|
/>
|
|
<Button type="submit" label='{sendLabel}' icon="icon-[lucide--send]" color='{color}' size='{size}' disabled='{disabled}' />
|
|
</form>
|
|
}
|
|
}
|