Skip to content

Commit

Permalink
Increase clickable area for header buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 23, 2023
1 parent ab0aae5 commit 14b2a5b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/batch/BatchIndicator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const BatchIndicator = ({ onClick }: { onClick?: () => void }) => {
return (
<BatchTooltip>
<Track {...BATCH_EVENTS.BATCH_SIDEBAR_OPEN} label={length}>
<ButtonBase title="Batch" onClick={onClick} sx={{ p: 0.5 }}>
<ButtonBase title="Batch" onClick={onClick} sx={{ p: 2 }}>
<Badge
variant="standard"
badgeContent={length}
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/ConnectWallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import type { ReactElement } from 'react'
import useWallet from '@/hooks/wallets/useWallet'
import AccountCenter from '@/components/common/ConnectWallet/AccountCenter'
import ConnectWalletButton from './ConnectWalletButton'
import css from './styles.module.css'

const ConnectWallet = (): ReactElement => {
const wallet = useWallet()

return wallet ? <AccountCenter wallet={wallet} /> : <ConnectWalletButton />
return <div className={css.container}>{wallet ? <AccountCenter wallet={wallet} /> : <ConnectWalletButton />}</div>
}

export default ConnectWallet
4 changes: 4 additions & 0 deletions src/components/common/ConnectWallet/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.container {
padding: 0 var(--space-2);
}

.buttonContainer {
display: flex;
align-items: center;
Expand Down
7 changes: 0 additions & 7 deletions src/components/common/Header/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}

.element {
padding: 0 var(--space-2);
height: 100%;
border-right: 1px solid var(--color-border-light);
display: flex;
Expand Down Expand Up @@ -42,8 +41,6 @@
}

.networkSelector {
padding-right: 0;
padding-left: 0;
border-right: none;
}

Expand All @@ -66,10 +63,6 @@
padding-left: var(--space-2);
}

.networkSelector {
padding-right: 0;
}

.hideMobile {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/SafeTokenWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const SafeTokenWidget = () => {
const flooredSafeBalance = formatVisualAmount(allocation || BigNumber.from(0), TOKEN_DECIMALS, 2)

return (
<Box className={css.buttonContainer}>
<Box className={css.container}>
<Tooltip
title={
url
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/SafeTokenWidget/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.buttonContainer {
.container {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-1);
height: 100%;
justify-content: center;
margin: 0 var(--space-2);
}

.tokenButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const NotificationCenter = (): ReactElement => {

return (
<>
<ButtonBase disableRipple className={css.bell} onClick={handleClick}>
<ButtonBase className={css.bell} onClick={handleClick}>
<UnreadBadge
invisible={!hasUnread}
anchorOrigin={{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.bell {
display: flex;
justify-content: center;
padding: 4px;
padding: var(--space-2) var(--space-2);
}

.bell svg path {
Expand Down
2 changes: 1 addition & 1 deletion src/components/walletconnect/WcHeaderWidget/WcIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const WcIcon = ({ sessionCount, sessionIcon, isError, onClick }: WcIconProps): R
const showIcon = sessionCount === 1 && !!sessionIcon

return (
<ButtonBase disableRipple onClick={onClick} title="WalletConnect">
<ButtonBase onClick={onClick} title="WalletConnect" sx={{ p: 2 }}>
<Badge
variant={isError ? 'dot' : 'standard'}
badgeContent={
Expand Down

0 comments on commit 14b2a5b

Please sign in to comment.