UNPKG

@coin-voyage/paykit

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

12 lines (11 loc) 1.02 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { truncateAddress } from "@coin-voyage/shared/common"; import useLocales from "../../../hooks/useLocales"; import { CopyRowOrThrobber } from "../../ui/CopyableInfo"; import { CountdownTimer } from "../../ui/CountDownTimer"; import { CopyableInfoWrapper, CountdownWrap } from "./styles"; export function CopyableInfo({ details, remainingS, totalS }) { const isExpired = details?.expirationS != null && remainingS === 0; const locales = useLocales(); return (_jsxs(CopyableInfoWrapper, { children: [_jsx(CopyRowOrThrobber, { title: locales.sendExactly, value: details?.amount?.toString(), smallText: details?.ticker, disabled: isExpired }), _jsx(CopyRowOrThrobber, { title: locales.depositAddress, value: details?.depositAddress, valueText: details?.depositAddress && truncateAddress(details.depositAddress), disabled: isExpired }), _jsx(CountdownWrap, { children: _jsx(CountdownTimer, { remainingS: remainingS, totalS: totalS }) })] })); }