From 7e54079fdb43182250627711b7e0f3d5b10bc9d5 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 5 Aug 2025 22:48:25 +0000 Subject: [PATCH] Create personal info component cgen-87d56a57665042d9b1b63e393f5d7591 --- client/components/onboarding/PersonalInfo.tsx | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 client/components/onboarding/PersonalInfo.tsx diff --git a/client/components/onboarding/PersonalInfo.tsx b/client/components/onboarding/PersonalInfo.tsx new file mode 100644 index 00000000..605771ad --- /dev/null +++ b/client/components/onboarding/PersonalInfo.tsx @@ -0,0 +1,134 @@ +import { OnboardingData } from "@/pages/Onboarding"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { ArrowLeft, ArrowRight } from "lucide-react"; + +interface PersonalInfoProps { + data: OnboardingData; + updateData: (data: Partial) => void; + nextStep: () => void; + prevStep: () => void; +} + +export default function PersonalInfo({ data, updateData, nextStep, prevStep }: PersonalInfoProps) { + const handleInputChange = (field: string, value: string) => { + updateData({ + personalInfo: { + ...data.personalInfo, + [field]: value + } + }); + }; + + const isValid = data.personalInfo.firstName && data.personalInfo.lastName && data.personalInfo.email; + + const getUserTypeLabel = () => { + switch (data.userType) { + case 'game-developer': return 'Game Developer'; + case 'client': return 'Client'; + case 'member': return 'Community Member'; + case 'customer': return 'Customer'; + default: return 'User'; + } + }; + + return ( +
+
+

+ Tell us a bit about yourself, {getUserTypeLabel().toLowerCase()} +

+
+ +
+
+
+ + handleInputChange('firstName', e.target.value)} + placeholder="Enter your first name" + className="bg-background/50 border-border/50 focus:border-aethex-400" + /> +
+
+ + handleInputChange('lastName', e.target.value)} + placeholder="Enter your last name" + className="bg-background/50 border-border/50 focus:border-aethex-400" + /> +
+
+ +
+ + handleInputChange('email', e.target.value)} + placeholder="Enter your email address" + className="bg-background/50 border-border/50 focus:border-aethex-400" + /> +
+ + {(data.userType === 'client' || data.userType === 'game-developer') && ( +
+ + handleInputChange('company', e.target.value)} + placeholder={ + data.userType === 'client' + ? "Enter your company name" + : "Enter your company/organization (optional)" + } + className="bg-background/50 border-border/50 focus:border-aethex-400" + /> +
+ )} +
+ +
+ + + +
+ +
+

+ * Required fields +

+
+
+ ); +}