-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from vercel-labs/polish-styles
Clean up some tw styles for video
- Loading branch information
Showing
8 changed files
with
83 additions
and
87 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
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,17 +1,24 @@ | ||
import { LoginForm } from './form'; | ||
import Link from 'next/link'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="flex w-1/4 items-center px-4 sm:px-6 lg:px-8"> | ||
<div className="mx-auto w-full space-y-8"> | ||
<div className="space-y-2 text-center"> | ||
<h1 className="text-3xl font-bold">Login</h1> | ||
<p className="text-sm text-gray-500"> | ||
Enter your email below to login to your account | ||
</p> | ||
</div> | ||
<div className="flex flex-col p-4 lg:w-1/3"> | ||
<div className="text-center"> | ||
<h1 className="text-3xl font-bold">Login</h1> | ||
<p className="text-gray-500"> | ||
Enter your email below to login to your account | ||
</p> | ||
</div> | ||
<div className="mt-6"> | ||
<LoginForm /> | ||
</div> | ||
<div className="mt-4 text-center text-sm"> | ||
Don't have an account?{' '} | ||
<Link className="underline" href="/signup"> | ||
Sign up | ||
</Link> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,37 +11,37 @@ export function SignupForm() { | |
|
||
return ( | ||
<form action={action}> | ||
<div className="space-y-2"> | ||
<Label htmlFor="name">Name</Label> | ||
<Input id="name" name="name" placeholder="John Doe" /> | ||
</div> | ||
{state?.errors?.name && ( | ||
<p className="text-red-500">{state.errors.name}</p> | ||
)} | ||
<div className="space-y-2"> | ||
<Label htmlFor="email">Email</Label> | ||
<Input id="email" name="email" placeholder="[email protected]" /> | ||
</div> | ||
{state?.errors?.email && ( | ||
<p className="text-red-500">{state.errors.email}</p> | ||
)} | ||
<div className="space-y-2"> | ||
<Label htmlFor="password">Password</Label> | ||
<Input id="password" name="password" type="password" /> | ||
</div> | ||
{state?.errors?.password && ( | ||
<div className="flex flex-col gap-2"> | ||
<div> | ||
<Label htmlFor="name">Name</Label> | ||
<Input id="name" name="name" placeholder="John Doe" /> | ||
</div> | ||
{state?.errors?.name && ( | ||
<p className="text-sm text-red-500">{state.errors.name}</p> | ||
)} | ||
<div> | ||
<Label htmlFor="email">Email</Label> | ||
<Input id="email" name="email" placeholder="[email protected]" /> | ||
</div> | ||
{state?.errors?.email && ( | ||
<p className="text-sm text-red-500">{state.errors.email}</p> | ||
)} | ||
<div> | ||
<p>Password must:</p> | ||
<ul> | ||
{state.errors.password.map((error) => ( | ||
<li key={error} className="text-red-500"> | ||
- {error} | ||
</li> | ||
))} | ||
</ul> | ||
<Label htmlFor="password">Password</Label> | ||
<Input id="password" name="password" type="password" /> | ||
</div> | ||
)} | ||
<SignupButton /> | ||
{state?.errors?.password && ( | ||
<div className="text-sm text-red-500"> | ||
<p>Password must:</p> | ||
<ul> | ||
{state.errors.password.map((error) => ( | ||
<li key={error}>- {error}</li> | ||
))} | ||
</ul> | ||
</div> | ||
)} | ||
<SignupButton /> | ||
</div> | ||
</form> | ||
); | ||
} | ||
|
@@ -50,7 +50,7 @@ export function SignupButton() { | |
const { pending } = useFormStatus(); | ||
|
||
return ( | ||
<Button aria-disabled={pending} type="submit"> | ||
<Button aria-disabled={pending} type="submit" className="mt-2 w-full"> | ||
{pending ? 'Submitting...' : 'Sign up'} | ||
</Button> | ||
); | ||
|
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
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