'use client'; import { SuccessSvg } from '@/internal/svg/fullWidthSuccessSvg'; import { cn, pressable, text } from '@/styles/theme'; import type { AppchainBridgeSuccessProps } from '../types'; import { useAppchainBridgeContext } from './AppchainBridgeProvider'; export const AppchainBridgeSuccess = ({ title = 'Success!', primaryButtonLabel = 'View Transaction', secondaryButtonLabel = 'Back to bridge', }: AppchainBridgeSuccessProps) => { const { handleOpenExplorer, handleResetState } = useAppchainBridgeContext(); return (
{title}
{[ { label: primaryButtonLabel, action: handleOpenExplorer, variant: 'primary', textColor: 'text-ock-foreground-inverse', }, { label: secondaryButtonLabel, action: handleResetState, variant: 'secondary', textColor: 'text-ock-foreground', }, ].map(({ label, action, variant, textColor }) => ( ))}
); };