summaryrefslogtreecommitdiffhomepage
path: root/desktop/packages/mullvad-vpn/src/renderer/components/AccountNumberLabel.tsx
blob: c41a6248aace00ca30ba70a7397738dea097e2d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { formatAccountNumber } from '../lib/account';
import ClipboardLabel from './ClipboardLabel';

interface IAccountNumberLabelProps {
  accountNumber: string;
  obscureValue?: boolean;
  className?: string;
}

export default function AccountNumberLabel(props: IAccountNumberLabelProps) {
  return (
    <ClipboardLabel
      value={props.accountNumber}
      displayValue={formatAccountNumber(props.accountNumber)}
      obscureValue={props.obscureValue}
      className={props.className}
      data-testid="account-number"
    />
  );
}