Skip to content

Commit b9e28cb

Browse files
BillLeoutsakosvl346Bill Leoutsakos
andauthored
improvement(ui): use outline chips for auth actions (#8133)
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
1 parent 9c1d3fe commit b9e28cb

5 files changed

Lines changed: 20 additions & 17 deletions

File tree

‎apps/sim/app/(auth)/components/auth-nav-prompt.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function AuthNavPrompt({ prompt, href, linkLabel, onNavigate }: AuthNavPr
1919
return (
2020
<div className='flex items-center justify-center gap-1 text-sm'>
2121
{prompt && <span className='text-[var(--text-muted)]'>{prompt}</span>}
22-
<ChipLink href={href} onClick={onNavigate} className='border border-[var(--border-1)]'>
22+
<ChipLink href={href} onClick={onNavigate} variant='outline'>
2323
{linkLabel}
2424
</ChipLink>
2525
</div>

‎apps/sim/app/(auth)/components/social-login-buttons.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { type ReactNode, useState } from 'react'
4-
import { Chip, cn } from '@sim/emcn'
4+
import { Chip } from '@sim/emcn'
55
import { createLogger } from '@sim/logger'
66
import { getErrorMessage } from '@sim/utils/errors'
77
import { GithubIcon, GoogleIcon, MicrosoftIcon } from '@/components/icons'
@@ -73,7 +73,8 @@ export function SocialLoginButtons({
7373
<Chip
7474
fullWidth
7575
leftIcon={GithubIcon}
76-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
76+
variant='outline'
77+
className={AUTH_BUTTON_CLASS}
7778
disabled={!githubAvailable || isGithubLoading}
7879
onClick={signInWithGithub}
7980
>
@@ -85,7 +86,8 @@ export function SocialLoginButtons({
8586
<Chip
8687
fullWidth
8788
leftIcon={GoogleIcon}
88-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
89+
variant='outline'
90+
className={AUTH_BUTTON_CLASS}
8991
disabled={!googleAvailable || isGoogleLoading}
9092
onClick={signInWithGoogle}
9193
>
@@ -97,7 +99,8 @@ export function SocialLoginButtons({
9799
<Chip
98100
fullWidth
99101
leftIcon={MicrosoftIcon}
100-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
102+
variant='outline'
103+
className={AUTH_BUTTON_CLASS}
101104
disabled={!microsoftAvailable || isMicrosoftLoading}
102105
onClick={signInWithMicrosoft}
103106
>

‎apps/sim/app/(auth)/components/sso-login-button.tsx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ export function SSOLoginButton({
2828

2929
return (
3030
<Chip
31-
variant={variant === 'primary' ? 'primary' : undefined}
31+
variant={variant}
3232
fullWidth
3333
onClick={handleSSOClick}
34-
className={cn(
35-
AUTH_BUTTON_CLASS,
36-
variant === 'outline' && 'border border-[var(--border-1)]',
37-
className
38-
)}
34+
className={cn(AUTH_BUTTON_CLASS, className)}
3935
>
4036
Sign in with SSO
4137
</Chip>

‎apps/sim/app/invite/components/status-card.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use client'
2-
import { Chip, cn, Loader } from '@sim/emcn'
2+
import { Chip, Loader } from '@sim/emcn'
33
import { AuthSubmitButton } from '@/app/(auth)/components'
44
import { AUTH_BUTTON_CLASS } from '@/app/(auth)/components/constants'
55
import { InviteHeading } from '@/app/invite/components/invite-heading'
@@ -80,7 +80,8 @@ export function InviteStatusCard({
8080
fullWidth
8181
onClick={action.onClick}
8282
disabled={action.disabled || action.loading}
83-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border)]')}
83+
variant='outline'
84+
className={AUTH_BUTTON_CLASS}
8485
>
8586
{action.loading ? (
8687
<span className='flex items-center gap-2'>

‎apps/sim/app/unsubscribe/unsubscribe.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { Suspense } from 'react'
4-
import { Chip, cn, Loader } from '@sim/emcn'
4+
import { Chip, Loader } from '@sim/emcn'
55
import { getErrorMessage } from '@sim/utils/errors'
66
import { useSearchParams } from 'next/navigation'
77
import type { UnsubscribeType } from '@/lib/api/contracts/user'
@@ -139,7 +139,8 @@ function UnsubscribeContent() {
139139
isAlreadyUnsubscribedFromAll ||
140140
data?.currentPreferences.unsubscribeMarketing
141141
}
142-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
142+
variant='outline'
143+
className={AUTH_BUTTON_CLASS}
143144
>
144145
{data?.currentPreferences.unsubscribeMarketing
145146
? 'Unsubscribed from Marketing'
@@ -154,7 +155,8 @@ function UnsubscribeContent() {
154155
isAlreadyUnsubscribedFromAll ||
155156
data?.currentPreferences.unsubscribeUpdates
156157
}
157-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
158+
variant='outline'
159+
className={AUTH_BUTTON_CLASS}
158160
>
159161
{data?.currentPreferences.unsubscribeUpdates
160162
? 'Unsubscribed from Updates'
@@ -169,7 +171,8 @@ function UnsubscribeContent() {
169171
isAlreadyUnsubscribedFromAll ||
170172
data?.currentPreferences.unsubscribeNotifications
171173
}
172-
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
174+
variant='outline'
175+
className={AUTH_BUTTON_CLASS}
173176
>
174177
{data?.currentPreferences.unsubscribeNotifications
175178
? 'Unsubscribed from Notifications'

0 commit comments

Comments
 (0)