1 import type { HTMLAttributes } from 'react';
3 import { c } from 'ttag';
5 import Copy from '@proton/components/components/button/Copy';
6 import useNotifications from '@proton/components/hooks/useNotifications';
7 import clsx from '@proton/utils/clsx';
9 export interface Props {
14 const BitcoinDetailsLine = ({
17 fieldClassName: className,
22 fieldClassName?: string;
23 } & HTMLAttributes<HTMLElement>) => {
24 const { createNotification } = useNotifications();
27 <div className="text-rg text-semibold mb-1">{label}</div>
28 <div className={clsx('rounded bg-weak py-1 px-3 flex justify-space-between items-center', className)}>
29 <span className="text-break" {...rest}>
38 text: c('Success').t`Copied to clipboard`,
47 const BitcoinDetails = ({ amount, address }: Props) => {
51 <BitcoinDetailsLine label={c('Label').t`BTC amount`} value={`${amount}`} fieldClassName="mb-4" />
53 <BitcoinDetailsLine label={c('Label').t`BTC address`} value={address} data-testid="btc-address" />
58 export default BitcoinDetails;