22 lines
470 B
Svelte
22 lines
470 B
Svelte
<script lang="ts">
|
|
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
import { cn } from "@/lib/utils.js";
|
|
|
|
let {
|
|
ref = $bindable(null),
|
|
class: className,
|
|
value = $bindable(""),
|
|
...restProps
|
|
}: InputOTPPrimitive.RootProps = $props();
|
|
</script>
|
|
|
|
<InputOTPPrimitive.Root
|
|
bind:ref
|
|
bind:value
|
|
data-slot="input-otp"
|
|
class={cn(
|
|
"has-disabled:opacity-50 flex items-center gap-2 [&_input]:disabled:cursor-not-allowed",
|
|
className
|
|
)}
|
|
{...restProps}
|
|
/>
|