signup form

This commit is contained in:
Om Lanke
2025-07-07 01:07:35 +05:30
parent c7111b4670
commit 498dc5aa94
8 changed files with 882 additions and 491 deletions

View File

@@ -0,0 +1,140 @@
// PersonalDetailsStep.tsx
'use client';
import {
FormField,
FormItem,
FormLabel,
FormControl,
FormMessage,
FormDescription,
} from '@workspace/ui/components/form';
import { Input } from '@workspace/ui/components/input';
import { Textarea } from '@workspace/ui/components/textarea';
import { Separator } from '@workspace/ui/components/separator';
export default function PersonalDetailsStep({ form }: { form: any }) {
return (
<div className="space-y-4">
<h3 className="text-lg font-semibold">Personal Details</h3>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<FormField
control={form.control}
name="firstName"
render={({ field }) => (
<FormItem>
<FormLabel>First Name *</FormLabel>
<FormControl>
<Input placeholder="Enter your first name" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="lastName"
render={({ field }) => (
<FormItem>
<FormLabel>Last Name *</FormLabel>
<FormControl>
<Input placeholder="Enter your last name" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<FormField
control={form.control}
name="middleName"
render={({ field }) => (
<FormItem>
<FormLabel>Middle Name</FormLabel>
<FormControl>
<Input placeholder="Enter your middle name" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="mothersName"
render={({ field }) => (
<FormItem>
<FormLabel>Mother's Name *</FormLabel>
<FormControl>
<Input placeholder="Enter your mother's name" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<Separator />
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<FormField
control={form.control}
name="personalGmail"
render={({ field }) => (
<FormItem>
<FormLabel>Personal Email *</FormLabel>
<FormControl>
<Input type="email" placeholder="Enter your Gmail address" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="rollNumber"
render={({ field }) => (
<FormItem>
<FormLabel>Roll Number *</FormLabel>
<FormControl>
<Input placeholder="Enter your roll number" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<FormField
control={form.control}
name="phoneNumber"
render={({ field }) => (
<FormItem>
<FormLabel>Phone Number *</FormLabel>
<FormControl>
<Input type="tel" placeholder="Enter your phone number" {...field} />
</FormControl>
<FormDescription>Without country code</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="address"
render={({ field }) => (
<FormItem>
<FormLabel>Address *</FormLabel>
<FormControl>
<Textarea placeholder="Enter your address" className="resize-none" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
);
}