fix: dark mode on signup and signin pages

This commit is contained in:
Doug Andrade
2023-06-11 12:26:47 -04:00
committed by Mythie
parent 4ea316a077
commit 3377e29c72
4 changed files with 42 additions and 22 deletions

View File

@ -10,17 +10,23 @@ export default function SignInPage() {
<main className="bg-sand-100 relative flex min-h-screen flex-col items-center justify-center overflow-hidden px-4 py-12 md:p-12 lg:p-24">
<div className="relative flex max-w-4xl items-center gap-x-24">
<div className="absolute -inset-96 -z-[1] flex items-center justify-center opacity-50">
<Image src={backgroundPattern} alt="background pattern" />
<Image
src={backgroundPattern}
alt="background pattern"
className="dark:brightness-95 dark:invert dark:sepia"
/>
</div>
<div className="max-w-md">
<h1 className="text-4xl font-semibold">Sign in to your account</h1>
<p className="mt-2 text-sm text-slate-500">Welcome back, we are lucky to have you.</p>
<p className="text-muted-foreground/60 mt-2 text-sm">
Welcome back, we are lucky to have you.
</p>
<SignInForm className="mt-4" />
<p className="mt-6 text-center text-sm text-slate-500">
<p className="text-muted-foreground mt-6 text-center text-sm">
Don't have an account?{' '}
<Link href="/signup" className="text-primary duration-200 hover:opacity-70">
Sign up

View File

@ -10,20 +10,24 @@ export default function SignUpPage() {
<main className="bg-sand-100 relative flex min-h-screen flex-col items-center justify-center overflow-hidden px-4 py-12 md:p-12 lg:p-24">
<div className="relative flex max-w-4xl items-center gap-x-24">
<div className="absolute -inset-96 -z-[1] flex items-center justify-center opacity-50">
<Image src={backgroundPattern} alt="background pattern" />
<Image
src={backgroundPattern}
alt="background pattern"
className="dark:brightness-95 dark:invert dark:sepia"
/>
</div>
<div className="max-w-md">
<h1 className="text-4xl font-semibold">Create a shiny, new Documenso Account </h1>
<p className="mt-2 text-sm text-slate-500">
<p className="text-muted-foreground/60 mt-2 text-sm">
Create your account and start using state-of-the-art document signing. Open and
beautiful signing is within your grasp.
</p>
<SignUpForm className="mt-4" />
<p className="mt-6 text-center text-sm text-slate-500">
<p className="text-muted-foreground mt-6 text-center text-sm">
Already have an account?{' '}
<Link href="/signin" className="text-primary duration-200 hover:opacity-70">
Sign in instead

View File

@ -86,7 +86,7 @@ export const SignInForm = ({ className }: SignInFormProps) => {
Email
</Label>
<Input id="email" type="email" className="mt-2 bg-white" {...register('email')} />
<Input id="email" type="email" className="bg-background mt-2" {...register('email')} />
{errors.email && <span className="mt-1 text-xs text-red-500">{errors.email.message}</span>}
</div>
@ -96,29 +96,34 @@ export const SignInForm = ({ className }: SignInFormProps) => {
Password
</Label>
<Input id="password" type="password" className="mt-2 bg-white" {...register('password')} />
<Input
id="password"
type="password"
className="bg-background mt-2"
{...register('password')}
/>
{errors.password && (
<span className="mt-1 text-xs text-red-500">{errors.password.message}</span>
)}
</div>
<Button size="lg" disabled={isSubmitting}>
<Button size="lg" disabled={isSubmitting} className="dark:bg-documenso dark:hover:opacity-90">
{isSubmitting && <Loader className="mr-2 h-5 w-5 animate-spin" />}
Sign In
</Button>
<div className="relative flex items-center justify-center gap-x-4 py-2 text-xs uppercase">
<div className="h-px flex-1 bg-slate-300" />
<span className="bg-transparent text-slate-500">Or continue with</span>
<div className="h-px flex-1 bg-slate-300" />
<div className="bg-border h-px flex-1" />
<span className="text-muted-foreground bg-transparent">Or continue with</span>
<div className="bg-border h-px flex-1" />
</div>
<Button
type="button"
size="lg"
variant={'outline'}
className="border bg-white text-slate-500"
className="bg-background text-muted-foreground border"
disabled={isSubmitting}
onClick={onSignInWithGoogleClick}
>

View File

@ -79,44 +79,49 @@ export const SignUpForm = ({ className }: SignUpFormProps) => {
onSubmit={handleSubmit(onFormSubmit)}
>
<div>
<Label htmlFor="name" className="text-slate-500">
<Label htmlFor="name" className="text-muted-foreground">
Name
</Label>
<Input id="name" type="text" className="mt-2 bg-white" {...register('name')} />
<Input id="name" type="text" className="bg-background mt-2" {...register('name')} />
{errors.name && <span className="mt-1 text-xs text-red-500">{errors.name.message}</span>}
</div>
<div>
<Label htmlFor="email" className="text-slate-500">
<Label htmlFor="email" className="text-muted-foreground">
Email
</Label>
<Input id="email" type="email" className="mt-2 bg-white" {...register('email')} />
<Input id="email" type="email" className="bg-background mt-2" {...register('email')} />
{errors.email && <span className="mt-1 text-xs text-red-500">{errors.email.message}</span>}
</div>
<div>
<Label htmlFor="password" className="text-slate-500">
<Label htmlFor="password" className="text-muted-foreground">
Password
</Label>
<Input id="password" type="password" className="mt-2 bg-white" {...register('password')} />
<Input
id="password"
type="password"
className="bg-background mt-2"
{...register('password')}
/>
</div>
<div>
<Label htmlFor="password" className="text-slate-500">
<Label htmlFor="password" className="text-muted-foreground">
Sign Here
</Label>
<div>
<SignaturePad className="mt-2 h-36 w-full rounded-lg border bg-white" />
<SignaturePad className="mt-2 h-36 w-full rounded-lg border bg-white dark:border-[#e2d7c5] dark:bg-[#fcf8ee]" />
</div>
</div>
<Button size="lg" disabled={isSubmitting}>
<Button size="lg" disabled={isSubmitting} className="dark:bg-documenso dark:hover:opacity-90">
{isSubmitting && <Loader className="mr-2 h-5 w-5 animate-spin" />}
Sign Up
</Button>