11"use client" ;
2+ import type { ThirdwebClient } from "../../../../../client/client.js" ;
23import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js" ;
34import {
45 iconSize ,
56 radius ,
67 spacing ,
78} from "../../../../core/design-system/index.js" ;
9+ import { Img } from "../../components/Img.js" ;
810import { Spacer } from "../../components/Spacer.js" ;
911import { Container } from "../../components/basic.js" ;
1012import { Button } from "../../components/buttons.js" ;
1113import { Text } from "../../components/text.js" ;
1214
1315export interface FiatProviderSelectionProps {
16+ client : ThirdwebClient ;
1417 onProviderSelected : ( provider : "coinbase" | "stripe" | "transak" ) => void ;
1518}
1619
1720export 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 >
0 commit comments