Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix WalletDropdown hover bug #1156

Merged
merged 8 commits into from
Aug 23, 2024
Merged

Conversation

cpcramer
Copy link
Contributor

@cpcramer cpcramer commented Aug 23, 2024

What changed? Why?
Remove the bottom WalletDropdown padding and instead apply the padding directly on the WalletDropdownDisconnect component. This fixes the on:hover bug of highlighting the border background while also aligns the direct padding with the Identity component.

Before After
Screenshot 2024-08-23 at 3 33 38 PM Screenshot 2024-08-23 at 3 29 14 PM

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 11:29pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 11:29pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 11:29pm

className,
)}
onClick={handleDisconnect}
>
<div className="-translate-y-1/2 absolute top-1/2 left-4 flex h-[1.125rem] w-[1.125rem] items-center justify-center">
<div className="absolute left-4 flex h-[1.125rem] w-[1.125rem] items-center justify-center">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these classes that were not needed with items-center

@@ -38,7 +38,7 @@ export function WalletDropdown({ children, className }: WalletDropdownReact) {
<div
className={cn(
pressable.default,
'absolute right-0 z-10 mt-1 flex w-max min-w-[250px] flex-col overflow-hidden rounded-xl pb-2',
'absolute right-0 z-10 mt-1 flex w-max min-w-[250px] flex-col overflow-hidden rounded-xl',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove bottom padding for the dropdown

@@ -19,12 +19,12 @@ export function WalletDropdownDisconnect({
type="button"
className={cn(
pressable.default,
'relative flex items-center px-4 py-3',
'relative flex items-center px-4 pt-3 pb-4',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the extra bottom padding to the disconnect button. This matches the padding for the Identity component.

@cpcramer cpcramer changed the title remove bottom padding onhover fix: Fix WalletDropdown hover bug Aug 23, 2024
@cpcramer cpcramer changed the title fix: Fix WalletDropdown hover bug chore: Fix WalletDropdown hover bug Aug 23, 2024
@Zizzamia
Copy link
Contributor

This is a fix to a component, so it requires a patch changeset info.

@Zizzamia Zizzamia merged commit 003c9b6 into main Aug 23, 2024
16 checks passed
@Zizzamia Zizzamia deleted the paul/fix-bottom-padding-hover branch August 23, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants