|
23 | 23 | const { form: formData, enhance } = form;
|
24 | 24 | </script>
|
25 | 25 |
|
26 |
| -<div class="flex h-screen w-full items-center justify-center px-4"> |
27 |
| - <form method="POST" class="flex w-full items-center justify-center px-4 pb-20" use:enhance> |
28 |
| - <Card.Root class="mx-auto w-full max-w-sm"> |
29 |
| - <Card.Header> |
30 |
| - <Card.Title class="text-2xl">Register</Card.Title> |
31 |
| - <Card.Description>Enter credentials for user registration.</Card.Description> |
32 |
| - </Card.Header> |
33 |
| - <Card.Content class="grid gap-4"> |
34 |
| - <Form.Field {form} name="username"> |
35 |
| - <Form.Control> |
36 |
| - {#snippet children({ props })} |
37 |
| - <Form.Label>Username</Form.Label> |
38 |
| - <Input {...props} bind:value={$formData.username} /> |
39 |
| - {/snippet} |
40 |
| - </Form.Control> |
41 |
| - <Form.FieldErrors /> |
42 |
| - </Form.Field> |
43 |
| - <Form.Field {form} name="password"> |
44 |
| - <Form.Control> |
45 |
| - {#snippet children({ props })} |
46 |
| - <Form.Label>Password</Form.Label> |
47 |
| - <Input type="password" {...props} bind:value={$formData.password} /> |
48 |
| - {/snippet} |
49 |
| - </Form.Control> |
50 |
| - <Form.FieldErrors /> |
51 |
| - </Form.Field> |
52 |
| - <Form.Field {form} name="secret"> |
53 |
| - <Form.Control> |
54 |
| - {#snippet children({ props })} |
55 |
| - <Form.Label>Secret</Form.Label> |
56 |
| - <Input type="password" {...props} bind:value={$formData.secret} /> |
57 |
| - {/snippet} |
58 |
| - </Form.Control> |
59 |
| - <Form.FieldErrors /> |
60 |
| - </Form.Field> |
61 |
| - <Form.Button type="submit">Submit</Form.Button> |
62 |
| - </Card.Content> |
63 |
| - </Card.Root> |
64 |
| - </form> |
65 |
| -</div> |
| 26 | +<form method="POST" class="flex h-[90dvh] w-full items-center justify-center px-4" use:enhance> |
| 27 | + <Card.Root class="mx-auto w-full max-w-sm"> |
| 28 | + <Card.Header> |
| 29 | + <Card.Title class="text-2xl">Register</Card.Title> |
| 30 | + <Card.Description>Enter credentials for user registration.</Card.Description> |
| 31 | + </Card.Header> |
| 32 | + <Card.Content class="grid gap-4"> |
| 33 | + <Form.Field {form} name="username"> |
| 34 | + <Form.Control> |
| 35 | + {#snippet children({ props })} |
| 36 | + <Form.Label>Username</Form.Label> |
| 37 | + <Input {...props} bind:value={$formData.username} /> |
| 38 | + {/snippet} |
| 39 | + </Form.Control> |
| 40 | + <Form.FieldErrors /> |
| 41 | + </Form.Field> |
| 42 | + <Form.Field {form} name="password"> |
| 43 | + <Form.Control> |
| 44 | + {#snippet children({ props })} |
| 45 | + <Form.Label>Password</Form.Label> |
| 46 | + <Input type="password" {...props} bind:value={$formData.password} /> |
| 47 | + {/snippet} |
| 48 | + </Form.Control> |
| 49 | + <Form.FieldErrors /> |
| 50 | + </Form.Field> |
| 51 | + <Form.Field {form} name="secret"> |
| 52 | + <Form.Control> |
| 53 | + {#snippet children({ props })} |
| 54 | + <Form.Label>Secret</Form.Label> |
| 55 | + <Input type="password" {...props} bind:value={$formData.secret} /> |
| 56 | + {/snippet} |
| 57 | + </Form.Control> |
| 58 | + <Form.FieldErrors /> |
| 59 | + </Form.Field> |
| 60 | + <Form.Button type="submit">Submit</Form.Button> |
| 61 | + </Card.Content> |
| 62 | + </Card.Root> |
| 63 | +</form> |
0 commit comments