UNPKG

@reservoir0x/relay-kit-ui

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

40 lines 3.42 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Anchor, Box, ChainTokenIcon, Flex, Text } from '../../../../primitives/index.js'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'; import { LoadingSpinner } from '../../../../common/LoadingSpinner.js'; import MoonPayLogo from '../../../../../img/MoonPayLogo.js'; export const OnrampProcessingPassthroughStep = ({ toToken, moonpayTxUrl, amount, amountToTokenFormatted }) => { return (_jsxs(Flex, { direction: "column", css: { width: '100%', height: '100%' }, children: [_jsx(Text, { style: "h6", css: { mb: '4' }, children: "Processing Transaction" }), _jsxs(Flex, { align: "center", css: { width: '100%', p: '3', mb: '2', gap: '2', background: 'gray2', borderRadius: 12 }, children: [_jsx(ChainTokenIcon, { chainId: toToken?.chainId, tokenlogoURI: toToken?.logoURI, tokenSymbol: toToken?.symbol, css: { width: 32, height: 32 } }), _jsxs(Flex, { align: "start", direction: "column", children: [_jsxs(Text, { style: "h6", children: [amountToTokenFormatted, " ", toToken.symbol] }), _jsx(Text, { style: "subtitle3", color: "subtle", children: amount })] })] }), _jsxs(Flex, { direction: "column", justify: "center", align: "center", css: { py: '4', px: '3', borderRadius: 'widget-card-border-radius', '--borderColor': 'colors.subtle-border-color', border: '1px solid var(--borderColor)' }, children: [_jsxs(Box, { css: { position: 'relative', width: 40, height: 40 }, children: [_jsx(MoonPayLogo, { style: { borderRadius: 12, width: 40, height: 40 } }), _jsx(Flex, { align: "center", justify: "center", css: { width: 24, height: 24, borderRadius: '100%', overflow: 'hidden', background: 'primary3', position: 'absolute', bottom: '-6px', right: '-6px', '--borderColor': 'colors.modal-background', border: '2px solid var(--borderColor)' }, children: _jsx(LoadingSpinner, { css: { height: 16, width: 16, fill: 'primary-color' } }) })] }), _jsx(Text, { style: "subtitle2", css: { mt: '24px', textAlign: 'center' }, children: "Finalizing your purchase through MoonPay, it may take a few minutes to process." }), moonpayTxUrl ? (_jsxs(Anchor, { href: moonpayTxUrl, target: "_blank", css: { display: 'flex', alignItems: 'center', gap: '1', mt: '2' }, children: ["Track MoonPay transaction", ' ', _jsx(FontAwesomeIcon, { icon: faUpRightFromSquare, style: { width: 14 } })] })) : null] }), _jsx(Text, { style: "body2", color: "subtle", css: { mt: '2' }, children: "Feel free to leave at any time, MoonPay will email you with updates." })] })); }; //# sourceMappingURL=OnrampProcessingPassthroughStep.js.map