Skip to content

Commit

Permalink
Merge pull request #92 from hanzoai/auth/login-panel-links
Browse files Browse the repository at this point in the history
Auth, UI: Visually updated StepIndicator component, open terms in new tab
  • Loading branch information
zeekay authored Apr 16, 2024
2 parents 42cd8d4 + 312ed87 commit fbcf543
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/auth/components/login-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const LoginPanel: React.FC<PropsWithChildren & {
<ProviderLoginButton provider='github' isLoading={isLoading} loginWithProvider={loginWithProvider}>
<GitHub height={20}/>Github
</ProviderLoginButton>
<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>
<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>
</>
)}
</ApplyTypography>
Expand Down
25 changes: 21 additions & 4 deletions packages/ui/primitives/step-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,37 @@ const StepIndicator: React.FC<{
style={{ paddingLeft: pX, paddingRight: pX }}
>
{steps.map((ignore, index) => (<>
{index !== 0 && (<div key={`sep-${index}`} className={'h-[1px] grow ' + (muted ? 'bg-muted' : 'bg-foreground')}/>)}
{index !== 0 && (
<div
key={`sep-${index}`}
className={cn(
'h-[1px] grow',
currentStep >= index ? (muted ? 'bg-muted' : 'bg-foreground') : (muted ? 'bg-muted-3' : 'bg-level-3'),
)}
/>
)}
<div
key={`circle-${index}`}
style={{width: `${dotSizeRem}rem`, height: `${dotSizeRem}rem`}}
className={cn(
'shrink-0 rounded-full border-[1.5px] ' + (muted ? 'border-muted' : 'border-foreground') ,
currentStep === index ? (muted ? 'bg-muted' : 'bg-foreground') : ''
'shrink-0 rounded-full border-[1.5px]',
currentStep === index ? (muted ? 'bg-muted-3 border-muted' : 'bg-level-3 border-foreground') : '',
currentStep > index || currentStep === steps.length - 1 ? (muted ? 'bg-muted border-muted' : 'bg-foreground border-foreground') : ''
)}
/>
</>))}
</div>
<div key='two' className={'grid ' + `grid-cols-${steps.length}` /* These are white listed already */} >
{steps.map((label, index) => (
<div key={index} className={'text-center whitespace-nowrap ' + (muted ? 'text-muted' : 'text-foreground')} >{label}</div>
<div
key={index}
className={cn(
'text-center whitespace-nowrap',
(muted ? 'text-muted' : 'text-foreground')
)}
>
{label}
</div>
))}
</div>
</div>
Expand Down

0 comments on commit fbcf543

Please sign in to comment.