fix: update LabeledInput component to use Label from UI library and adjust spacing in LoginForm
Some checks failed
container-scan / Container Scan (pull_request) Failing after 21s
docker-build / docker (pull_request) Failing after 42s

This commit is contained in:
Maximilian Liebmann 2025-05-11 13:46:40 +02:00 committed by SomeCodecat
parent fb4fd26d3f
commit 402b6623dd
2 changed files with 6 additions and 5 deletions

View file

@ -1,4 +1,5 @@
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
export default function LabeledInput({
type,
@ -11,17 +12,17 @@ export default function LabeledInput({
placeholder?: string;
value?: string;
}) {
const randomId = Math.random().toString(36).substring(2, 15);
const elementId = Math.random().toString(36).substring(2, 15);
return (
<div className='flex flex-col gap-2'>
<label htmlFor={randomId}>{label}</label>
<div className='flex flex-col gap-1'>
<Label htmlFor={elementId}>{label}</Label>
<Input
type={type}
placeholder={placeholder}
defaultValue={value}
id={randomId}
id={elementId}
/>
</div>
);

View file

@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button';
export default function LoginForm() {
return (
<form className='flex flex-col gap-4 w-full'>
<form className='flex flex-col gap-5 w-full'>
<LabeledInput
type='email'
label='E-Mail'