Skip to content

[TOOL-5021] SDK: Fix theme in ConnectButton Details Modal Buy screen #7589

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ten-places-feel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix theme in ConnectButton Details Modal Buy screen
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,11 @@
onCancel={() => setScreen("main")}
onSuccess={() => setScreen("main")}
supportedTokens={props.supportedTokens}
theme={props.theme}
style={{
border: "none",
borderRadius: radius.lg,
}}

Check warning on line 985 in packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx#L981-L985

Added lines #L981 - L985 were not covered by tests
tokenAddress={
props.displayBalanceToken?.[Number(requestedChainId)] as
| `0x${string}`
Expand Down
11 changes: 11 additions & 0 deletions packages/thirdweb/src/stories/ConnectButton/themes.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react-vite";
import { darkTheme } from "../../react/core/design-system/index.js";
import { ConnectButton } from "../../react/web/ui/ConnectWallet/ConnectButton.js";
import { storyClient } from "../utils.js";

Expand Down Expand Up @@ -27,4 +28,14 @@ export const Light: Story = {
},
};

export const CustomBlack: Story = {
args: {
theme: darkTheme({
colors: {
modalBg: "black",
},
}),
},
};

export default meta;
Loading