File tree Expand file tree Collapse file tree 5 files changed +17
-6
lines changed
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components Expand file tree Collapse file tree 5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export function BuyTokenEmbed(props: {
6464 } }
6565 theme = { themeObj }
6666 tokenAddress = { props . tokenAddress as `0x${string } `}
67+ paymentMethods = { [ "card" ] }
6768 />
6869 ) }
6970
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { Spinner } from "../components/Spinner.js";
2525import { Text } from "../components/text.js" ;
2626
2727interface StepRunnerProps {
28+ title ?: string ;
2829 request : BridgePrepareRequest ;
2930
3031 /**
@@ -64,6 +65,7 @@ interface StepRunnerProps {
6465}
6566
6667export function StepRunner ( {
68+ title,
6769 request,
6870 wallet,
6971 client,
@@ -248,7 +250,7 @@ export function StepRunner({
248250
249251 return (
250252 < Container flex = "column" fullHeight p = "md" >
251- < ModalHeader onBack = { onBack } title = "Processing Payment" />
253+ < ModalHeader onBack = { onBack } title = { title || "Processing Payment" } />
252254
253255 < Spacer y = "xl" />
254256
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ import type { UIOptions } from "../BridgeOrchestrator.js";
2121import { PaymentOverview } from "./PaymentOverview.js" ;
2222
2323export interface PaymentDetailsProps {
24+ title ?: string ;
25+ confirmButtonLabel ?: string ;
26+
2427 /**
2528 * The UI mode to use
2629 */
@@ -55,6 +58,8 @@ export interface PaymentDetailsProps {
5558}
5659
5760export function PaymentDetails ( {
61+ title,
62+ confirmButtonLabel,
5863 uiOptions,
5964 client,
6065 paymentMethod,
@@ -262,7 +267,7 @@ export function PaymentDetails({
262267
263268 return (
264269 < Container flex = "column" fullHeight p = "md" >
265- < ModalHeader onBack = { onBack } title = "Payment Details" />
270+ < ModalHeader onBack = { onBack } title = { title || "Payment Details" } />
266271
267272 < Spacer y = "xl" />
268273
@@ -427,7 +432,7 @@ export function PaymentDetails({
427432 { /* Action Buttons */ }
428433 < Container flex = "column" gap = "sm" >
429434 < Button fullWidth onClick = { handleConfirm } variant = "accent" >
430- Confirm Payment
435+ { confirmButtonLabel || " Confirm Payment" }
431436 </ Button >
432437 </ Container >
433438 </ Container >
Original file line number Diff line number Diff line change @@ -352,6 +352,8 @@ function SwapWidgetContent(props: SwapWidgetProps) {
352352 if ( screen . id === "2:preview" ) {
353353 return (
354354 < PaymentDetails
355+ title = "Review Swap"
356+ confirmButtonLabel = "Swap"
355357 client = { props . client }
356358 onBack = { ( ) => {
357359 setScreen ( { id : "1:swap-ui" } ) ;
@@ -384,6 +386,7 @@ function SwapWidgetContent(props: SwapWidgetProps) {
384386 if ( screen . id === "3:execute" ) {
385387 return (
386388 < StepRunner
389+ title = "Processing Swap"
387390 autoStart = { true }
388391 client = { props . client }
389392 onBack = { ( ) => {
Original file line number Diff line number Diff line change 1- import type { Meta } from "@storybook/react-vite " ;
1+ import type { Meta } from "@storybook/react" ;
22import { lightTheme } from "../../../react/core/design-system/index.js" ;
33import { SwapWidget } from "../../../react/web/ui/Bridge/swap-widget/SwapWidget.js" ;
44import { ConnectButton } from "../../../react/web/ui/ConnectWallet/ConnectButton.js" ;
55import { storyClient } from "../../utils.js" ;
66
7- const meta = {
7+ const meta : Meta < typeof SwapWidget > = {
88 parameters : {
99 layout : "centered" ,
1010 } ,
@@ -27,7 +27,7 @@ const meta = {
2727 ) ;
2828 } ,
2929 ] ,
30- } satisfies Meta < typeof SwapWidget > ;
30+ } ;
3131export default meta ;
3232
3333export function BasicUsage ( ) {
You can’t perform that action at this time.
0 commit comments