/* @flow */ import React, { useState } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; import { Select, Button, Input, Link, colors } from 'trezor-ui-components'; import l10nCommonMessages from 'views/common.messages'; import type { Props } from './Container'; const Wrapper = styled.div` text-align: left; flex-direction: column; display: flex; padding: 24px; min-width: 300px; `; const StyledSelect = styled(Select)` min-width: 100px; `; const InputRow = styled.div` margin-bottom: 16px; `; const Label = styled.div` color: ${colors.TEXT_SECONDARY}; padding-bottom: 10px; `; const ButtonActions = styled.div` display: flex; flex-direction: row; justify-content: flex-end; `; const ButtonWrapper = styled.div` & + & { margin-left: 10px; } `; const Import = (props: Props) => { const [selectedNetwork, setSelectedNetwork] = useState(null); const [address, setAddress] = useState(''); const { networks } = props.config; return ( // a.shortcut.localeCompare(b.shortcut)) .map(net => ({ label: net.shortcut, value: net, }))} onChange={option => setSelectedNetwork(option)} /> setAddress(e.target.value)} type="text" /> // ); }; export default Import;