Skip to content

Commit 72b801c

Browse files
Updated ios android ui
1 parent 02ae3b2 commit 72b801c

File tree

3 files changed

+54
-19
lines changed

3 files changed

+54
-19
lines changed

packages/adapters/wallet-connect-v1-adapter/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const WALLET_CONNECT_EXTENSION_ADAPTERS: IWalletConnectExtensionAdapter[]
44
{
55
name: "Rainbow",
66
chains: [CHAIN_NAMESPACES.EIP155],
7-
logo: "",
7+
logo: "https://images.web3auth.io/login-rainbow.svg",
88
mobile: {
99
native: "rainbow:",
1010
universal: "https://rnbwapp.com",

packages/ui/css/web3auth.css

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,21 +503,48 @@
503503
}
504504

505505
#w3a-modal .w3a-wallet-connect__container {
506-
padding: 10px;
507506
background: #ffffff;
508507
border-radius: 10px;
509508
color: var(--text-color1);
510509
font-size: 10px;
511510
width: fit-content;
512511
margin: auto;
512+
min-width: 250px;
513+
padding: 16px 12px;
513514
}
514515

515-
.w3a-wallet-connect-qr {
516-
width: 200px;
516+
#w3a-modal .w3a-wallet-connect__container-desktop,
517+
#w3a-modal .w3a-wallet-connect__container-android {
518+
margin: auto;
519+
}
520+
521+
#w3a-modal .w3a-wallet-connect__container-ios {
522+
display: flex;
523+
grid-gap: 30px 20px;
524+
padding: 0 0 28px;
525+
box-sizing: border-box;
526+
flex-wrap: wrap;
527+
}
528+
529+
#w3a-modal .w3a-wallet-connect-qr {
517530
margin: 16px 16px;
518531
padding: inherit;
519532
}
520533

534+
#w3a-modal .w3a-wallet-connect__container-android a {
535+
text-decoration: none;
536+
}
537+
538+
#w3a-modal .w3a-wallet-connect__container-android .w3a-button {
539+
background-color: rgb(64, 153, 255) !important;
540+
color: #ffffff !important;
541+
height: auto;
542+
font-size: 14px;
543+
padding: 8px 16px;
544+
width: auto;
545+
margin: auto;
546+
}
547+
521548
#w3a-modal .w3a-wallet-connect__logo > img {
522549
text-align: center;
523550
width: 115px;

packages/ui/src/components/WalletConnect.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,34 +81,42 @@ function WalletConnect(props: WalletConnectProps) {
8181
// TODO: show only wcAdapters of current chain
8282
return (
8383
<div className="w3ajs-wallet-connect w3a-wallet-connect">
84-
<i className="w3a-wallet-connect__logo">{walletConnectIcon}</i>
85-
<div className="w3ajs-wallet-connect__container w3a-wallet-connect__container">
84+
<div
85+
className={`w3ajs-wallet-connect__container w3a-wallet-connect__container${
86+
deviceDetails.os === OS_MAP.Android ? " w3a-wallet-connect__container--android" : ""
87+
}`}
88+
>
89+
<div className="w3a-wallet-connect__logo">{walletConnectIcon}</div>
8690
{deviceDetails.platform === PLATFORMS_MAP.desktop ? (
87-
<>
91+
<div className="w3a-wallet-connect__container-desktop">
8892
<div>Scan QR code with a WalletConnect-compatible wallet</div>
8993
<div className="w3ajs-wallet-connect-qr w3a-wallet-connect-qr">
9094
<QRCode size={200} value={walletConnectUri} />
9195
</div>
92-
</>
96+
</div>
9397
) : (
9498
<>
9599
{links.map((link) => {
96100
// TODO: render logo and on click,
97101
// https://github.com/WalletConnect/walletconnect-monorepo/blob/54f3ca0b1cd1ac24e8992a5a812fdfad01769abb/packages/helpers/browser-utils/src/registry.ts#L24
98102
// format and show
99103
return deviceDetails.os === OS_MAP.iOS ? (
100-
<a key={link.name} href={link.href} rel="noopener noreferrer" target="_blank">
101-
<button type="button" className="w3a-button w3a-button--icon">
102-
{link.logo}
103-
</button>
104-
<p className="w3a-adapter-item__label">{link.name}</p>
105-
</a>
104+
<div className="w3a-wallet-connect__container-ios">
105+
<a key={link.name} href={link.href} rel="noopener noreferrer" target="_blank">
106+
<button type="button" className="w3a-button w3a-button--icon">
107+
<img src={link.logo} height="auto" width="auto" alt={`login-${link.name}`} />
108+
</button>
109+
<p className="w3a-adapter-item__label">{link.name}</p>
110+
</a>
111+
</div>
106112
) : (
107-
<a key={link.name} href={link.href} rel="noopener noreferrer" target="_blank">
108-
<button type="button" className="w3a-button w3a-button--icon">
109-
Connect
110-
</button>
111-
</a>
113+
<div className="w3a-wallet-connect__container-android">
114+
<a key={link.name} href={link.href} rel="noopener noreferrer" target="_blank">
115+
<button type="button" className="w3a-button">
116+
Connect
117+
</button>
118+
</a>
119+
</div>
112120
);
113121
})}
114122
</>

0 commit comments

Comments
 (0)