Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Common/EnhancedInputs.js
import * as React from 'react'; | import * as React from 'react'; | ||||
import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||
import { Form, Input, Select } from 'antd'; | import { Form, Input, Select } from 'antd'; | ||||
const { TextArea } = Input; | |||||
import { | import { | ||||
ThemedDollarOutlined, | ThemedDollarOutlined, | ||||
ThemedWalletOutlined, | ThemedWalletOutlined, | ||||
} from '@components/Common/CustomIcons'; | } from '@components/Common/CustomIcons'; | ||||
import styled, { css } from 'styled-components'; | import styled, { css } from 'styled-components'; | ||||
import ScanQRCode from './ScanQRCode'; | import ScanQRCode from './ScanQRCode'; | ||||
import useBCH from '@hooks/useBCH'; | import useBCH from '@hooks/useBCH'; | ||||
import { currency } from '@components/Common/Ticker.js'; | import { currency } from '@components/Common/Ticker.js'; | ||||
▲ Show 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
DestinationAddressSingle.propTypes = { | DestinationAddressSingle.propTypes = { | ||||
onScan: PropTypes.func, | onScan: PropTypes.func, | ||||
loadWithCameraOpen: PropTypes.bool, | loadWithCameraOpen: PropTypes.bool, | ||||
inputProps: PropTypes.object, | inputProps: PropTypes.object, | ||||
}; | }; | ||||
export const DestinationAddressMulti = ({ inputProps, ...otherProps }) => { | |||||
return ( | |||||
<AntdFormWrapper> | |||||
<Form.Item {...otherProps}> | |||||
<TextArea | |||||
prefix={<ThemedWalletOutlined />} | |||||
autoComplete="off" | |||||
{...inputProps} | |||||
/> | |||||
</Form.Item> | |||||
</AntdFormWrapper> | |||||
); | |||||
}; | |||||
DestinationAddressMulti.propTypes = { | |||||
inputProps: PropTypes.object, | |||||
}; | |||||
export const CurrencySelectDropdown = selectProps => { | export const CurrencySelectDropdown = selectProps => { | ||||
const { Option } = Select; | const { Option } = Select; | ||||
// Build select dropdown from currency.fiatCurrencies | // Build select dropdown from currency.fiatCurrencies | ||||
const currencyMenuOptions = []; | const currencyMenuOptions = []; | ||||
const currencyKeys = Object.keys(currency.fiatCurrencies); | const currencyKeys = Object.keys(currency.fiatCurrencies); | ||||
for (let i = 0; i < currencyKeys.length; i += 1) { | for (let i = 0; i < currencyKeys.length; i += 1) { | ||||
const currencyMenuOption = {}; | const currencyMenuOption = {}; | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |