ghost-portal/packages/ui-react-app/src/InputAddress/optionItem.js
Jaco Greeff e02b971998
Allow external address input (#34)
* Allow external address input

* Remove hold-over debug log
2018-05-09 17:54:17 +02:00

28 lines
640 B
JavaScript

// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import type { KeyringOption } from './types';
import React from 'react';
import PairDisplay from './PairDisplay';
export default function createItem (address: string, name?: string, isManual: boolean = false): KeyringOption {
// flowlint-next-line sketchy-null-string:off
name = name || address;
return {
'data-manual': isManual,
name,
text: (
<PairDisplay
address={address}
name={name}
/>
),
value: address
};
}