-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create onboarding pt1; need form logic
- Loading branch information
1 parent
9b88cbf
commit ace09ae
Showing
7 changed files
with
133 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ interface Props { | |
|
||
export default function GetStartedPage({ setPage }: Props) { | ||
return ( | ||
<div className="flex flex-col"> | ||
<div className="flex flex-col shrink-0 py-7 gap-4 items-center justify-center bg-onboarding-background"> | ||
<div className="flex flex-col flex-grow"> | ||
<div className="lg:hidden flex flex-col shrink-0 py-7 gap-4 items-center justify-center bg-onboarding-background"> | ||
<img | ||
src="/MBBLogo.svg" | ||
className="stroke-[2.1px] object-contain sm:stroke-[3px]" | ||
|
@@ -31,6 +31,7 @@ export default function GetStartedPage({ setPage }: Props) { | |
<strong className="font-semibold">[email protected]</strong>{" "} | ||
or call us at <strong className="font-semibold">678-404-1397</strong>. | ||
</p> | ||
<div className="flex-grow" /> | ||
<Button type="primary" text="Get Started" onClick={() => setPage(1)} /> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
import { useState } from "react"; | ||
import Button from "@components/atoms/Button"; | ||
import { OnboardingFormData } from "@lib/types/users"; | ||
import { Dispatch, SetStateAction } from "react"; | ||
import { UseFormReturn } from "react-hook-form"; | ||
|
||
interface Props { | ||
setPage: (arg0: any) => any; | ||
setPage: Dispatch<SetStateAction<number>>; | ||
form: UseFormReturn<OnboardingFormData>; | ||
} | ||
|
||
export default function PreferredContactPage({ setPage }: Props) { | ||
return <div></div>; | ||
export default function PreferredContactPage({ setPage, form }: Props) { | ||
return ( | ||
<div className="flex flex-col px-6 gap-3 flex-grow"> | ||
<h1 className="text-primary-text text-2xl font-bold font-opensans"> | ||
What’s the best way to contact you? | ||
</h1> | ||
<input type="radio" /> | ||
<input type="radio" /> | ||
<input type="radio" /> | ||
<div className="flex-grow" /> | ||
<Button text="Finish" onClick={() => { | ||
// TODO: submit form data | ||
}} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,49 @@ | ||
import { useState } from "react"; | ||
import Button from "@components/atoms/Button"; | ||
import TextInput from "@components/atoms/TextInput"; | ||
import { OnboardingFormData } from "@lib/types/users"; | ||
import { Dispatch, SetStateAction } from "react"; | ||
import { UseFormReturn } from "react-hook-form"; | ||
|
||
interface Props { | ||
setPage: (arg0: any) => any; | ||
setPage: Dispatch<SetStateAction<number>>; | ||
form: UseFormReturn<OnboardingFormData>; | ||
} | ||
|
||
export default function ShippingAddressPage({ setPage }: Props) { | ||
return <div></div>; | ||
export default function ShippingAddressPage({ setPage, form }: Props) { | ||
return ( | ||
<div className="flex flex-col px-6 gap-3 flex-grow"> | ||
<h1 className="text-primary-text text-2xl font-bold font-opensans"> | ||
Shipping Address | ||
</h1> | ||
<p>Let us know where we can deliver your requested supplies!</p> | ||
<div> | ||
<label>Street Address</label> | ||
<TextInput | ||
placeholder="Street number and name" | ||
formValue={form.register("address")} | ||
/> | ||
</div> | ||
<div> | ||
<label> | ||
Apartment/Suite <span className="text-dark-gray">(Optional)</span> | ||
</label> | ||
<TextInput placeholder="Apartment number, suite number" /> | ||
</div> | ||
<div> | ||
<label>City</label> | ||
<TextInput /> | ||
</div> | ||
<div> | ||
<label>State</label> | ||
<select /> {/* TODO: replace with Dropdown */} | ||
</div> | ||
<div> | ||
<label>Zip Code</label> | ||
<TextInput /> | ||
</div> | ||
<input type="checkbox" /> {/* TODO: replace with <CheckboxText /> */} | ||
<div className="flex-grow" /> | ||
<Button text="Next" onClick={() => setPage((prev) => prev + 1)} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters