MeetUp/src/components/labeled-input.tsx
Maximilian Liebmann 8ab50b2c5e
All checks were successful
container-scan / Container Scan (pull_request) Successful in 8m27s
docker-build / docker (pull_request) Successful in 9m5s
refactor: restyle login page with UI components
Improves the login page's visual appearance by using Card and Input components.
2025-05-09 17:38:07 +02:00

28 lines
548 B
TypeScript

import { Input } from '@/components/ui/input';
export default function LabeledInput({
type,
label,
placeholder,
value,
}: {
type: 'text' | 'email' | 'password';
label: string;
placeholder?: string;
value?: string;
}) {
const randomId = Math.random().toString(36).substring(2, 15);
return (
<div className='flex flex-col gap-2'>
<label htmlFor={randomId}>{label}</label>
<Input
type={type}
placeholder={placeholder}
defaultValue={value}
id={randomId}
/>
</div>
);
}