import React from 'react'; import { AmountFieldFactory } from './AmountFieldFactory'; import { Aux } from 'components/ui'; import { UnitDropDown } from 'components'; import translate, { translateRaw } from 'translations'; interface Props { hasUnitDropdown?: boolean; showAllTokens?: boolean; customValidator?(rawAmount: string): boolean; } export const AmountField: React.SFC = ({ hasUnitDropdown, showAllTokens, customValidator }) => ( (
{hasUnitDropdown && }
)} /> ); const isAmountValid = (raw, customValidator, isValid) => customValidator ? customValidator(raw) : isValid;