summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/AccountTokenLabel.tsx
blob: d5817498716e81eaad218e216c302d708d346c3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as React from 'react';
import { Types } from 'reactxp';
import { formatAccountToken } from '../lib/account';
import ClipboardLabel from './ClipboardLabel';

interface IAccountTokenLabelProps {
  accountToken: string;
  style?: Types.StyleRuleSetRecursive<Types.TextStyleRuleSet>;
}

export default function AccountTokenLabel(props: IAccountTokenLabelProps) {
  return (
    <ClipboardLabel
      style={props.style}
      value={props.accountToken}
      displayValue={formatAccountToken(props.accountToken)}
    />
  );
}