Files
gpx.studio/website/src/lib/components/ui/textarea/textarea.svelte

23 lines
766 B
Svelte
Raw Normal View History

2024-06-12 18:48:03 +02:00
<script lang="ts">
2025-06-08 16:32:41 +02:00
import type { WithElementRef, WithoutChildren } from "bits-ui";
2024-06-12 18:48:03 +02:00
import type { HTMLTextareaAttributes } from "svelte/elements";
import { cn } from "$lib/utils.js";
2025-06-08 16:32:41 +02:00
let {
ref = $bindable(null),
value = $bindable(),
class: className,
...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}
2024-06-12 18:48:03 +02:00
class={cn(
2025-06-08 16:32:41 +02:00
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
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>