fix: input otp

This commit is contained in:
glazk0 2025-01-29 13:54:38 +01:00
parent aa4a7cd2d3
commit 2dd913eb86
No known key found for this signature in database

View file

@ -11,7 +11,6 @@
import * as Form from '$lib/components/ui/form';
import { Input } from '$lib/components/ui/input';
import * as InputOTP from '$lib/components/ui/input-otp';
import { formConfirmationSchema, formSchema } from './schema';
@ -140,15 +139,7 @@
<Form.Control>
{#snippet children({ props })}
<Form.Label>Code de confirmation</Form.Label>
<InputOTP.Root {...props} maxlength={9} bind:value={$formConfirmationData.code}>
{#snippet children({ cells })}
<InputOTP.Group>
{#each cells as cell}
<InputOTP.Slot {cell} />
{/each}
</InputOTP.Group>
{/snippet}
</InputOTP.Root>
<Input {...props} bind:value={$formConfirmationData.code} placeholder="00fa-00fa" />
{/snippet}
</Form.Control>
<Form.FieldErrors />