2024-06-12 18:48:03 +02:00
|
|
|
<script lang="ts">
|
2025-06-21 21:07:36 +02:00
|
|
|
import { cn, type WithElementRef, type WithoutChildren } from "$lib/utils.js";
|
2024-06-12 18:48:03 +02:00
|
|
|
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
|
|
|
|
2025-06-08 16:32:41 +02:00
|
|
|
let {
|
|
|
|
|
ref = $bindable(null),
|
|
|
|
|
value = $bindable(),
|
|
|
|
|
class: className,
|
2025-10-18 18:51:11 +02:00
|
|
|
"data-slot": dataSlot = "textarea",
|
2025-06-08 16:32:41 +02:00
|
|
|
...restProps
|
|
|
|
|
}: WithoutChildren<WithElementRef<HTMLTextareaAttributes>> = $props();
|
2024-06-12 18:48:03 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<textarea
|
2025-06-08 16:32:41 +02:00
|
|
|
bind:this={ref}
|
2025-10-18 18:51:11 +02:00
|
|
|
data-slot={dataSlot}
|
2024-06-12 18:48:03 +02:00
|
|
|
class={cn(
|
2026-04-06 18:22:01 +02:00
|
|
|
"border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
2024-06-12 18:48:03 +02:00
|
|
|
className
|
|
|
|
|
)}
|
|
|
|
|
bind:value
|
2025-06-08 16:32:41 +02:00
|
|
|
{...restProps}
|
2024-06-12 18:48:03 +02:00
|
|
|
></textarea>
|