Skip to content

Commit fbcf543

Browse files
authored
Merge pull request #92 from hanzoai/auth/login-panel-links
Auth, UI: Visually updated StepIndicator component, open terms in new tab
2 parents 42cd8d4 + 312ed87 commit fbcf543

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

packages/auth/components/login-panel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const LoginPanel: React.FC<PropsWithChildren & {
163163
<ProviderLoginButton provider='github' isLoading={isLoading} loginWithProvider={loginWithProvider}>
164164
<GitHub height={20}/>Github
165165
</ProviderLoginButton>
166-
<p className='text-sm text-muted-2'>By logging in, you agree to our <Link href={termsOfServiceUrl ?? ''}>Terms of Service</Link> and <Link href={privacyPolicyUrl ?? ''}>Privacy Policy</Link>.</p>
166+
<p className='text-sm text-muted-2'>By logging in, you agree to our <Link href={termsOfServiceUrl ?? ''} target='_blank'>Terms of Service</Link> and <Link href={privacyPolicyUrl ?? ''} target='_blank'>Privacy Policy</Link>.</p>
167167
</>
168168
)}
169169
</ApplyTypography>

packages/ui/primitives/step-indicator.tsx

+21-4
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,37 @@ const StepIndicator: React.FC<{
2727
style={{ paddingLeft: pX, paddingRight: pX }}
2828
>
2929
{steps.map((ignore, index) => (<>
30-
{index !== 0 && (<div key={`sep-${index}`} className={'h-[1px] grow ' + (muted ? 'bg-muted' : 'bg-foreground')}/>)}
30+
{index !== 0 && (
31+
<div
32+
key={`sep-${index}`}
33+
className={cn(
34+
'h-[1px] grow',
35+
currentStep >= index ? (muted ? 'bg-muted' : 'bg-foreground') : (muted ? 'bg-muted-3' : 'bg-level-3'),
36+
)}
37+
/>
38+
)}
3139
<div
3240
key={`circle-${index}`}
3341
style={{width: `${dotSizeRem}rem`, height: `${dotSizeRem}rem`}}
3442
className={cn(
35-
'shrink-0 rounded-full border-[1.5px] ' + (muted ? 'border-muted' : 'border-foreground') ,
36-
currentStep === index ? (muted ? 'bg-muted' : 'bg-foreground') : ''
43+
'shrink-0 rounded-full border-[1.5px]',
44+
currentStep === index ? (muted ? 'bg-muted-3 border-muted' : 'bg-level-3 border-foreground') : '',
45+
currentStep > index || currentStep === steps.length - 1 ? (muted ? 'bg-muted border-muted' : 'bg-foreground border-foreground') : ''
3746
)}
3847
/>
3948
</>))}
4049
</div>
4150
<div key='two' className={'grid ' + `grid-cols-${steps.length}` /* These are white listed already */} >
4251
{steps.map((label, index) => (
43-
<div key={index} className={'text-center whitespace-nowrap ' + (muted ? 'text-muted' : 'text-foreground')} >{label}</div>
52+
<div
53+
key={index}
54+
className={cn(
55+
'text-center whitespace-nowrap',
56+
(muted ? 'text-muted' : 'text-foreground')
57+
)}
58+
>
59+
{label}
60+
</div>
4461
))}
4562
</div>
4663
</div>

0 commit comments

Comments
 (0)