Skip to content

Commit

Permalink
fix: support all button variants
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Sep 4, 2023
1 parent c20a23a commit f47430d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/pages/auth/ConnectWithLightning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ interface ConnectWithLightningModalProps {
}

interface ConnectWithLightningProps extends ButtonProps {
variant?: 'secondary'
onClose?: () => void
}

Expand Down Expand Up @@ -108,10 +107,8 @@ export const ConnectWithLightning = ({
w="100%"
variant={variant}
size="sm"
color={variant === 'secondary' ? 'primary' : 'black'}
backgroundColor={
variant === 'secondary' ? 'transparent' : 'social.lightning'
}
color={variant ? 'primary' : 'black'}
backgroundColor={variant ? 'transparent' : 'social.lightning'}
leftIcon={<BoltSvgIcon height="20px" width="20px" />}
_hover={{ backgroundColor: 'social.lightningDark', color: 'white' }}
onClick={onModalOpen}
Expand Down
7 changes: 2 additions & 5 deletions src/pages/auth/ConnectWithNostr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { FailedToConnectAccount } from './components/FailedToConnectAccount'
import { NostrHelpModal } from './components/NostrHelpModal'

type Props = {
variant?: 'secondary'
onClose?: () => void
}

Expand Down Expand Up @@ -47,11 +46,9 @@ export const ConnectWithNostr = ({ onClose, variant }: Props) => {
w="100%"
size="sm"
variant={variant}
backgroundColor={
variant === 'secondary' ? 'transparent' : 'social.nostr'
}
backgroundColor={variant ? 'transparent' : 'social.nostr'}
leftIcon={<NostrSvgIcon height="20px" width="20px" />}
color={variant === 'secondary' ? 'social.nostr' : 'white'}
color={variant ? 'social.nostr' : 'white'}
_hover={{ backgroundColor: 'social.nostrDark', color: 'white' }}
onClick={handleClick}
>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/auth/ConnectWithTwitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useMeQuery } from '../../types'
import { hasTwitterAccount, useNotification } from '../../utils'

interface ConnectWithTwitterProps extends ButtonProps {
variant?: 'secondary'
onClose?: () => void
}

Expand Down Expand Up @@ -123,10 +122,8 @@ export const ConnectWithTwitter = ({
isExternal
w="100%"
size="sm"
color={variant === 'secondary' ? 'social.twitter' : 'black'}
backgroundColor={
variant === 'secondary' ? 'transparent' : 'social.twitter'
}
color={variant ? 'social.twitter' : 'black'}
backgroundColor={variant ? 'transparent' : 'social.twitter'}
leftIcon={<BsTwitter />}
_hover={{
backgroundColor: 'social.twitterDark',
Expand Down

0 comments on commit f47430d

Please sign in to comment.