Skip to content

Commit 7b0ba47

Browse files
committed
refactor: improve setup form layout and typography
1 parent f41466a commit 7b0ba47

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

apps/account/src/routes/setup.tsx

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,40 +122,42 @@ function SetupPage() {
122122

123123
return (
124124
<div className="flex min-h-svh w-full items-center justify-center bg-muted p-6">
125-
<div className="flex w-full max-w-sm flex-col gap-4">
126-
<a href="#" className="flex items-center gap-2 self-center text-sm font-medium">
125+
<div className="flex w-full max-w-md flex-col gap-6">
126+
<a href="#" className="flex items-center gap-2 self-center font-medium">
127127
<div className="flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground">
128128
<GalleryVerticalEnd className="size-4" />
129129
</div>
130130
ObjectStack
131131
</a>
132132
<Card>
133-
<CardHeader className="pb-4">
134-
<CardTitle className="text-lg">{t('auth.setup.welcomeTitle')}</CardTitle>
135-
<CardDescription className="text-xs">
136-
{t('auth.setup.description')}
137-
</CardDescription>
133+
<CardHeader className="text-center">
134+
<CardTitle>{t('auth.setup.welcomeTitle')}</CardTitle>
135+
<CardDescription>{t('auth.setup.description')}</CardDescription>
138136
</CardHeader>
139137
<CardContent>
140-
<form onSubmit={handleSubmit} className="flex flex-col gap-3">
141-
<div className="grid grid-cols-2 gap-3">
142-
<div className="flex flex-col gap-1.5">
143-
<Label htmlFor="name" className="text-xs">{t('auth.setup.yourName')}</Label>
144-
<Input id="name" autoComplete="name" required value={name} onChange={(e) => setName(e.target.value)} />
145-
</div>
146-
<div className="flex flex-col gap-1.5">
147-
<Label htmlFor="orgName" className="text-xs">{t('auth.setup.orgName')}</Label>
148-
<Input
149-
id="orgName"
150-
required
151-
placeholder={t('auth.setup.orgNamePlaceholder')}
152-
value={orgName}
153-
onChange={(e) => setOrgName(e.target.value)}
154-
/>
155-
</div>
138+
<form onSubmit={handleSubmit} className="flex flex-col gap-4">
139+
<div className="flex flex-col gap-2">
140+
<Label htmlFor="name">{t('auth.setup.yourName')}</Label>
141+
<Input
142+
id="name"
143+
autoComplete="name"
144+
required
145+
value={name}
146+
onChange={(e) => setName(e.target.value)}
147+
/>
148+
</div>
149+
<div className="flex flex-col gap-2">
150+
<Label htmlFor="orgName">{t('auth.setup.orgName')}</Label>
151+
<Input
152+
id="orgName"
153+
required
154+
placeholder={t('auth.setup.orgNamePlaceholder')}
155+
value={orgName}
156+
onChange={(e) => setOrgName(e.target.value)}
157+
/>
156158
</div>
157-
<div className="flex flex-col gap-1.5">
158-
<Label htmlFor="email" className="text-xs">{t('auth.emailLabel')}</Label>
159+
<div className="flex flex-col gap-2">
160+
<Label htmlFor="email">{t('auth.emailLabel')}</Label>
159161
<Input
160162
id="email"
161163
type="email"
@@ -166,8 +168,8 @@ function SetupPage() {
166168
onChange={(e) => setEmail(e.target.value)}
167169
/>
168170
</div>
169-
<div className="flex flex-col gap-1.5">
170-
<Label htmlFor="password" className="text-xs">{t('auth.passwordLabel')}</Label>
171+
<div className="flex flex-col gap-2">
172+
<Label htmlFor="password">{t('auth.passwordLabel')}</Label>
171173
<Input
172174
id="password"
173175
type="password"
@@ -179,7 +181,7 @@ function SetupPage() {
179181
onChange={(e) => setPassword(e.target.value)}
180182
/>
181183
</div>
182-
<Button type="submit" className="mt-1 w-full" disabled={submitting}>
184+
<Button type="submit" className="mt-2 w-full" disabled={submitting}>
183185
{submitting ? t('auth.setup.submitting') : t('auth.setup.submit')}
184186
</Button>
185187
</form>

0 commit comments

Comments
 (0)