Skip to content

Commit 003c9b6

Browse files
authored
fix: css WalletDropdown hover bug (#1156)
1 parent 4e86a07 commit 003c9b6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/chatty-coins-sort.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@coinbase/onchainkit": patch
3+
---
4+
5+
- **chore**: Remove the bottom WalletDropdown padding and instead apply the bottom padding directly on the WalletDropdownDisconnect component. This fixes a bug where the WalletDropdown bottom padding would unintentionally change on:hover. @cpcramer #1156

src/wallet/components/WalletDropdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function WalletDropdown({ children, className }: WalletDropdownReact) {
3838
<div
3939
className={cn(
4040
pressable.default,
41-
'absolute right-0 z-10 mt-1 flex w-max min-w-[250px] flex-col overflow-hidden rounded-xl pb-2',
41+
'absolute right-0 z-10 mt-1 flex w-max min-w-[250px] flex-col overflow-hidden rounded-xl',
4242
className,
4343
)}
4444
data-testid="ockWalletDropdown"

src/wallet/components/WalletDropdownDisconnect.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ export function WalletDropdownDisconnect({
1919
type="button"
2020
className={cn(
2121
pressable.default,
22-
'relative flex items-center px-4 py-3',
22+
'relative flex items-center px-4 pt-3 pb-4',
2323
className,
2424
)}
2525
onClick={handleDisconnect}
2626
>
27-
<div className="-translate-y-1/2 absolute top-1/2 left-4 flex h-[1.125rem] w-[1.125rem] items-center justify-center">
27+
<div className="absolute left-4 flex h-[1.125rem] w-[1.125rem] items-center justify-center">
2828
{disconnectSvg}
2929
</div>
3030
<span className={cn(dsText.body, 'pl-6')}>{text}</span>

0 commit comments

Comments
 (0)