Skip to content

Commit

Permalink
feat: respect theme accentColor for default connect UI icons (#5163)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquim-verges authored Oct 24, 2024
1 parent 52229be commit 158c2b6
Show file tree
Hide file tree
Showing 16 changed files with 230 additions and 105 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-bears-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Respect theme accentColor for default icons in connect UI
65 changes: 34 additions & 31 deletions apps/playground-web/src/app/connect/sign-in/button/RightSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,37 @@ export function RightSection(props: {
}
}, [connectOptions.enableAuth, doLogout]);

const connectButton = (
<ConnectButton
client={THIRDWEB_CLIENT}
autoConnect={false}
theme={themeObj}
locale={connectOptions.localeId}
connectButton={{
label: connectOptions.buttonLabel,
}}
connectModal={{
size: connectOptions.modalSize,
title: connectOptions.modalTitle,
titleIcon: connectOptions.modalTitleIcon,
termsOfServiceUrl: connectOptions.termsOfServiceLink,
privacyPolicyUrl: connectOptions.privacyPolicyLink,
showThirdwebBranding: connectOptions.ShowThirdwebBranding,
requireApproval: connectOptions.requireApproval,
}}
wallets={wallets}
auth={connectOptions.enableAuth ? playgroundAuth : undefined}
accountAbstraction={
connectOptions.enableAccountAbstraction
? {
chain: ethereum,
sponsorGas: true,
}
: undefined
}
/>
);

return (
<div className="flex shrink-0 flex-col gap-4 xl:sticky xl:top-0 xl:max-h-[100vh] xl:w-[764px]">
<TabButtons
Expand Down Expand Up @@ -115,7 +146,8 @@ export function RightSection(props: {

{previewTab === "modal" &&
(account && (!connectOptions.enableAuth || isLoggedIn) ? (
<ConnectButton client={THIRDWEB_CLIENT} />
// TODO: should show the expanded connected modal here instead
connectButton
) : (
<div className="relative">
<ConnectEmbed
Expand Down Expand Up @@ -154,36 +186,7 @@ export function RightSection(props: {
</div>
))}

{previewTab === "button" && (
<ConnectButton
client={THIRDWEB_CLIENT}
autoConnect={false}
theme={themeObj}
locale={connectOptions.localeId}
connectButton={{
label: connectOptions.buttonLabel,
}}
connectModal={{
size: connectOptions.modalSize,
title: connectOptions.modalTitle,
titleIcon: connectOptions.modalTitleIcon,
termsOfServiceUrl: connectOptions.termsOfServiceLink,
privacyPolicyUrl: connectOptions.privacyPolicyLink,
showThirdwebBranding: connectOptions.ShowThirdwebBranding,
requireApproval: connectOptions.requireApproval,
}}
wallets={wallets}
auth={connectOptions.enableAuth ? playgroundAuth : undefined}
accountAbstraction={
connectOptions.enableAccountAbstraction
? {
chain: ethereum,
sponsorGas: true,
}
: undefined
}
/>
)}
{previewTab === "button" && connectButton}

{previewTab === "code" && <CodeGen connectOptions={connectOptions} />}
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/thirdweb/src/react/core/utils/walletIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ const githubIconUri =
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA2IiBoZWlnaHQ9IjEwNiIgdmlld0JveD0iMCAwIDEwNiAxMDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjUzIiBjeT0iNTMiIHI9IjUzIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUyLjg1NCA0QzI1LjgzOSA0IDQgMjYgNCA1My4yMTdDNCA3NC45NzMgMTcuOTkzIDkzLjM4OSAzNy40MDUgOTkuOTA3QzM5LjgzMiAxMDAuMzk3IDQwLjcyMSA5OC44NDggNDAuNzIxIDk3LjU0NUM0MC43MjEgOTYuNDA0IDQwLjY0MSA5Mi40OTMgNDAuNjQxIDg4LjQxOEMyNy4wNTEgOTEuMzUyIDI0LjIyMSA4Mi41NTEgMjQuMjIxIDgyLjU1MUMyMi4wMzcgNzYuODQ3IDE4LjgwMSA3NS4zOD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DkgMTQuNjY2OEM1LjkwNzA5IDE0LjIyNjggNi4wNjcwOSAxMy43ODY4IDYuMTQ3MDkgMTMuMzMzNSIgc3Ryb2tlPSIjMzM4NUZGIiBzdHJva2Utd2lkdGg9IjEuMjU0OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02IDQuNTMzNDZDNi42MDgyNyA0LjE4MjI4IDcuMjk4MjggMy45OTc0NSA4LjAwMDY0IDMuOTk3NTZDOC43MDMwMSAzLjk5NzY3IDkuMzkyOTYgNC4xODI3MiAxMC4wMDExIDQuNTM0MUMxMC42MDkzIDQuODg1NDggMTEuMTE0MiA1LjM5MDc5IDExLjQ2NTEgNS45OTkyM0MxMS44MTYgNi42MDc2NiAxMi4wMDA1IDcuMjk3NzYgMTIgOC4wMDAxMlY5LjMzMzQ2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF81NjM5XzMyIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=";

export const socialIcons = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ export const MenuButton = /* @__PURE__ */ StyledButton((_) => {
},
"&[disabled]": {
cursor: "not-allowed",
svg: {
display: "none",
},
},
svg: {
color: theme.colors.secondaryText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
radius,
spacing,
} from "../../../core/design-system/index.js";
import { genericWalletIcon } from "../../../core/utils/walletIcon.js";
import { useSetSelectionData } from "../../providers/wallet-ui-states-provider.js";
import { sortWallets } from "../../utils/sortWallets.js";
import { LoadingScreen } from "../../wallets/shared/LoadingScreen.js";
Expand All @@ -42,6 +41,7 @@ import { PoweredByThirdweb } from "./PoweredByTW.js";
import { WalletButtonEl, WalletEntryButton } from "./WalletEntryButton.js";
import { WalletTypeRowButton } from "./WalletTypeRowButton.js";
import { compactModalMaxHeight } from "./constants.js";
import { OutlineWalletIcon } from "./icons/OutlineWalletIcon.js";
import type { ConnectLocale } from "./locale/types.js";

const InAppWalletSelectionUI = /* @__PURE__ */ lazy(
Expand Down Expand Up @@ -226,7 +226,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
const connectAWallet = (
<WalletTypeRowButton
client={props.client}
icon={genericWalletIcon}
icon={OutlineWalletIcon}
onClick={() => {
setIsWalletGroupExpanded(true);
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import type { ThirdwebClient } from "../../../../client/client.js";
import {
iconSize,
radius,
spacing,
} from "../../../core/design-system/index.js";
import { iconSize, spacing } from "../../../core/design-system/index.js";
import { Text } from "../../ui/components/text.js";
import { Img } from "../components/Img.js";
import { Container } from "../components/basic.js";
import { Button } from "../components/buttons.js";
import type { IconFC } from "./icons/types.js";

type WalletTypeRowProps = {
client: ThirdwebClient;
onClick: () => void;
title: string;
icon: string;
icon: IconFC;
disabled?: boolean;
};

Expand All @@ -33,16 +29,7 @@ export function WalletTypeRowButton(props: WalletTypeRowProps) {
disabled={props.disabled}
>
<Container flex="row" gap="sm" center="y" color="accentText">
<Img
client={props.client}
src={props.icon}
width={iconSize.md}
height={iconSize.md}
loading="eager"
style={{
borderRadius: radius.md,
}}
/>
<props.icon size={iconSize.md} />
<Text color="primaryText">{props.title}</Text>
</Container>
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { IconFC } from "./types.js";

/**
* @internal
*/
export const EmailIcon: IconFC = (props) => {
return (
<svg
width={props.size}
height={props.size}
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="presentation"
>
<path
d="M13.3335 2.6665H2.66683C1.93045 2.6665 1.3335 3.26346 1.3335 3.99984V11.9998C1.3335 12.7362 1.93045 13.3332 2.66683 13.3332H13.3335C14.0699 13.3332 14.6668 12.7362 14.6668 11.9998V3.99984C14.6668 3.26346 14.0699 2.6665 13.3335 2.6665Z"
stroke={props.color ?? "currentColor"}
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M14.6668 4.6665L8.68683 8.4665C8.48101 8.59545 8.24304 8.66384 8.00016 8.66384C7.75728 8.66384 7.51931 8.59545 7.3135 8.4665L1.3335 4.6665"
stroke={props.color ?? "currentColor"}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
};
Loading

0 comments on commit 158c2b6

Please sign in to comment.