Skip to content

Commit 48fe2ce

Browse files
authored
connect wallet: UI and text adjustments (#844)
1 parent 55edaa9 commit 48fe2ce

File tree

7 files changed

+21
-10
lines changed

7 files changed

+21
-10
lines changed

.changeset/long-ties-visit.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/react": patch
3+
---
4+
5+
connect wallet UI and text adjustments

packages/react/src/components/Modal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ const DialogContent = styled.div<{ theme?: Theme }>`
117117
padding-bottom: ${spacing.xl};
118118
animation: ${modalAnimationDesktop} 200ms ease;
119119
box-shadow: ${shadow.lg};
120+
line-height: 1;
120121
121122
&:focus {
122123
outline: none;

packages/react/src/wallet/ConnectWallet/Connect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const ConnectModal = () => {
179179
>
180180
<Modal
181181
style={{
182-
maxWidth: "450px",
182+
maxWidth: "480px",
183183
}}
184184
open={hideModal ? false : isWalletModalOpen}
185185
setOpen={(value) => {

packages/react/src/wallet/ConnectWallet/Details.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const ConnectedWalletDetails: React.FC<{
112112
) : (
113113
<Skeleton height={fontSize.sm} width="82px" />
114114
)}
115-
<Spacer y="xxs" />
115+
<Spacer y="xs" />
116116
<WalletAddress>{shortenString(address || "")}</WalletAddress>
117117
</ColFlex>
118118

@@ -367,7 +367,7 @@ const dropdownContentFade = keyframes`
367367
`;
368368

369369
const DropDownContent = styled(DropdownMenu.Content)<{ theme?: Theme }>`
370-
width: 340px;
370+
width: 360px;
371371
box-sizing: border-box;
372372
max-width: 100%;
373373
border-radius: ${radius.lg};
@@ -377,16 +377,17 @@ const DropDownContent = styled(DropdownMenu.Content)<{ theme?: Theme }>`
377377
border: 1px solid ${(props) => props.theme.border.base};
378378
background-color: ${(props) => props.theme.bg.base};
379379
z-index: 1000000;
380+
line-height: 1;
380381
`;
381382

382383
const WalletInfoButton = styled.button<{ theme?: Theme }>`
383384
all: unset;
384385
background: ${(props) => props.theme.bg.base};
385386
border: 1px solid ${(props) => props.theme.border.base};
386-
padding: ${spacing.sm} ${spacing.md};
387+
padding: ${spacing.sm} ${spacing.sm};
387388
border-radius: ${radius.lg};
388389
cursor: pointer;
389-
display: flex;
390+
display: inline-flex;
390391
align-items: center;
391392
gap: ${spacing.md};
392393
box-sizing: border-box;
@@ -461,6 +462,7 @@ const MenuButton = styled.button<{ theme?: Theme }>`
461462
color: ${(props) => props.theme.text.neutral} !important;
462463
gap: ${spacing.sm};
463464
-webkit-tap-highlight-color: transparent;
465+
line-height: 1.3;
464466
465467
&:not([disabled]):hover {
466468
transition: box-shadow 250ms ease, border-color 250ms ease;

packages/react/src/wallet/ConnectWallet/NetworkSelector.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const NetworkList: React.FC<{
183183
style={{
184184
display: "flex",
185185
flexDirection: "column",
186-
gap: spacing.xxs,
186+
gap: spacing.xs,
187187
}}
188188
>
189189
{chainName}

packages/react/src/wallet/ConnectWallet/screens/GetStartedScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const GetStartedScreen: React.FC<{
140140
width: "100%",
141141
}}
142142
>
143-
I{`'`}ve finished setting up my {props.walletName} mobile wallet
143+
I{`'`}ve finished setting up my {props.walletName} on mobile
144144
</HelperLink>
145145
</>
146146
)}

packages/react/src/wallet/ConnectWallet/screens/ScanScreen.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export const ScanScreen: React.FC<{
1818
walletName: string;
1919
walletIconURL: string;
2020
}> = (props) => {
21+
const walletName = props.walletName.toLowerCase().includes("wallet")
22+
? props.walletName
23+
: `${props.walletName} wallet`;
2124
return (
2225
<>
2326
<BackButton
@@ -47,12 +50,12 @@ export const ScanScreen: React.FC<{
4750

4851
<Spacer y="xl" />
4952

50-
<ModalTitle>Scan with {props.walletName} wallet</ModalTitle>
53+
<ModalTitle>Scan with {walletName} </ModalTitle>
5154
<Spacer y="md" />
5255

5356
<ModalDescription>
5457
Scan this QR code with your phone <br />
55-
camera or {props.walletName} wallet to connect
58+
camera or {walletName} to connect
5659
</ModalDescription>
5760

5861
<Spacer y="md" />
@@ -69,7 +72,7 @@ export const ScanScreen: React.FC<{
6972
<Spacer y="xl" />
7073

7174
<LinkButton onClick={props.onGetStarted}>
72-
{`Don't`} have {props.walletName} Wallet?
75+
{`Don't`} have {walletName}?
7376
</LinkButton>
7477
</div>
7578
</>

0 commit comments

Comments
 (0)