Skip to content

Commit 84a5e8c

Browse files
committed
feat: adds onramp logos
1 parent d2dcf7c commit 84a5e8c

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

packages/thirdweb/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
"use client";
2+
import type { ThirdwebClient } from "../../../../../client/client.js";
23
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
34
import {
45
iconSize,
56
radius,
67
spacing,
78
} from "../../../../core/design-system/index.js";
9+
import { Img } from "../../components/Img.js";
810
import { Spacer } from "../../components/Spacer.js";
911
import { Container } from "../../components/basic.js";
1012
import { Button } from "../../components/buttons.js";
1113
import { Text } from "../../components/text.js";
1214

1315
export interface FiatProviderSelectionProps {
16+
client: ThirdwebClient;
1417
onProviderSelected: (provider: "coinbase" | "stripe" | "transak") => void;
1518
}
1619

1720
export function FiatProviderSelection({
21+
client,
1822
onProviderSelected,
1923
}: FiatProviderSelectionProps) {
2024
const theme = useCustomTheme();
@@ -24,22 +28,19 @@ export function FiatProviderSelection({
2428
id: "coinbase" as const,
2529
name: "Coinbase",
2630
description: "Fast and secure payments",
27-
backgroundColor: theme.colors.accentText,
28-
initial: "CB",
31+
iconUri: "https://i.ibb.co/LDJ3Rk2t/Frame-5.png",
2932
},
3033
{
3134
id: "stripe" as const,
3235
name: "Stripe",
3336
description: "Trusted payment processing",
34-
backgroundColor: "#635BFF",
35-
initial: "S",
37+
iconUri: "https://i.ibb.co/CpgQC2Lf/images-3.png",
3638
},
3739
{
3840
id: "transak" as const,
3941
name: "Transak",
4042
description: "Global payment solution",
41-
backgroundColor: "#2B6CB0",
42-
initial: "T",
43+
iconUri: "https://i.ibb.co/Xx2r882p/Transak-official-symbol-1.png",
4344
},
4445
];
4546

@@ -76,28 +77,25 @@ export function FiatProviderSelection({
7677
width: `${iconSize.md}px`,
7778
height: `${iconSize.md}px`,
7879
borderRadius: "50%",
79-
backgroundColor: provider.backgroundColor,
8080
display: "flex",
8181
alignItems: "center",
8282
justifyContent: "center",
8383
padding: spacing.xs,
84+
overflow: "hidden",
8485
}}
8586
>
86-
<Text
87-
size="xs"
88-
color="primaryButtonText"
89-
style={{ fontWeight: 600 }}
90-
>
91-
{provider.initial}
92-
</Text>
87+
<Img
88+
src={provider.iconUri}
89+
alt={provider.name}
90+
width={iconSize.md}
91+
height={iconSize.md}
92+
client={client}
93+
/>
9394
</Container>
9495
<Container flex="column" gap="3xs" style={{ flex: 1 }}>
9596
<Text size="sm" color="primaryText" style={{ fontWeight: 600 }}>
9697
{provider.name}
9798
</Text>
98-
<Text size="xs" color="secondaryText">
99-
{provider.description}
100-
</Text>
10199
</Container>
102100
</Container>
103101
</Button>

packages/thirdweb/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export function PaymentSelection({
250250

251251
{currentStep.type === "fiatProviderSelection" && (
252252
<FiatProviderSelection
253+
client={client}
253254
onProviderSelected={handleOnrampProviderSelected}
254255
/>
255256
)}

0 commit comments

Comments
 (0)