mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
badebe017f
* Add UnitInput component * Add CurrencyInput component * Add UserPreferencedCurrencyInput component * Add UserPreferencedCurrencyDisplay component * Add updatePreferences action * Add styles for CurrencyInput, CurrencyDisplay, and UnitInput * Update SettingsTab page with Primary Currency toggle * Refactor currency displays and inputs to use UserPreferenced displays and inputs * Add TokenInput component * Add UserPreferencedTokenInput component * Use TokenInput in the send screen * Fix unit tests * Fix e2e and integration tests * Remove send/CurrencyDisplay component * Replace diamond unicode character with Eth logo. Fix typos
21 lines
475 B
JavaScript
21 lines
475 B
JavaScript
import React, { PureComponent } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import CurrencyInput from '../currency-input'
|
|
|
|
export default class UserPreferencedCurrencyInput extends PureComponent {
|
|
static propTypes = {
|
|
useETHAsPrimaryCurrency: PropTypes.bool,
|
|
}
|
|
|
|
render () {
|
|
const { useETHAsPrimaryCurrency, ...restProps } = this.props
|
|
|
|
return (
|
|
<CurrencyInput
|
|
{...restProps}
|
|
useFiat={!useETHAsPrimaryCurrency}
|
|
/>
|
|
)
|
|
}
|
|
}
|