Skip to content

Commit 6a94696

Browse files
committed
Fix Wallet switcher icon position in wallet details modal (#3762)
<!-- start pr-codex --> ## PR-Codex overview This PR fixes the wallet switcher icon position in the wallet details modal. ### Detailed summary - Adjusted the wallet switcher icon position in `Modal.tsx` - Updated the `borderRadius` in `buttons.tsx` - Added a new `ShuffleIconLucide` component in `ShuffleIconLucide.tsx` - Replaced `ShuffleIcon` with `ShuffleIconLucide` in `Details.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent d6b2c25 commit 6a94696

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

.changeset/metal-zoos-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix Wallet switcher icon position in wallet details modal

packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
PaperPlaneIcon,
77
PinBottomIcon,
88
PlusIcon,
9-
ShuffleIcon,
109
TextAlignJustifyIcon,
1110
} from "@radix-ui/react-icons";
1211
import { useQuery } from "@tanstack/react-query";
@@ -79,6 +78,7 @@ import { CoinsIcon } from "./icons/CoinsIcon.js";
7978
import { FundsIcon } from "./icons/FundsIcon.js";
8079
import { GenericWalletIcon } from "./icons/GenericWalletIcon.js";
8180
import { OutlineWalletIcon } from "./icons/OutlineWalletIcon.js";
81+
import { ShuffleIconLucide } from "./icons/ShuffleIconLucide.js";
8282
import { SmartWalletBadgeIcon } from "./icons/SmartAccountBadgeIcon.js";
8383
import { getConnectLocale } from "./locale/getConnectLocale.js";
8484
import type { ConnectLocale } from "./locale/types.js";
@@ -344,15 +344,25 @@ function DetailsModal(props: {
344344
<IconButton
345345
style={{
346346
position: "absolute",
347-
top: `${spacing.lg}`,
348-
left: `${spacing.sm}`,
349-
padding: "3px",
347+
top: spacing.lg,
348+
left: spacing.lg,
349+
transform: "translateX(-6px)",
350350
}}
351351
onClick={() => {
352352
setScreen("wallet-manager");
353353
}}
354354
>
355-
<ShuffleIcon width={iconSize.md} height={iconSize.md} />
355+
<div
356+
style={{
357+
width: `${iconSize.md}px`,
358+
height: `${iconSize.md}px`,
359+
display: "flex",
360+
alignItems: "center",
361+
justifyContent: "center",
362+
}}
363+
>
364+
<ShuffleIconLucide size="20" />
365+
</div>
356366
</IconButton>
357367

358368
<Container px="lg" flex="column" center="x">
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { IconFC } from "./types.js";
2+
3+
export const ShuffleIconLucide: IconFC = (props) => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width={props.size}
8+
height={props.size}
9+
viewBox="0 0 24 24"
10+
fill="none"
11+
stroke="currentColor"
12+
strokeWidth="2"
13+
strokeLinecap="round"
14+
strokeLinejoin="round"
15+
role="presentation"
16+
>
17+
<path d="M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22" />
18+
<path d="m18 2 4 4-4 4" />
19+
<path d="M2 6h1.9c1.5 0 2.9.9 3.6 2.2" />
20+
<path d="M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8" />
21+
<path d="m18 14 4 4-4 4" />
22+
</svg>
23+
);
24+
};

packages/thirdweb/src/react/web/ui/components/Modal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ export const CrossContainer = /* @__PURE__ */ StyledDiv({
138138
position: "absolute",
139139
top: spacing.lg,
140140
right: spacing.lg,
141-
transform: "translateX(15%)",
142-
[media.mobile]: {
143-
right: spacing.md,
144-
},
141+
transform: "translateX(6px)",
145142
});
146143

147144
const modalAnimationDesktop = keyframes`

packages/thirdweb/src/react/web/ui/components/buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const IconButton = /* @__PURE__ */ StyledButton((_) => {
141141
display: "inline-flex",
142142
alignItems: "center",
143143
justifyContent: "center",
144-
borderRadius: radius.md,
144+
borderRadius: radius.sm,
145145
WebkitTapHighlightColor: "transparent",
146146
color: theme.colors.secondaryIconColor,
147147
padding: "2px",

0 commit comments

Comments
 (0)