From b7eb2e887d636e2ed61eade4bae01596dba4b4c2 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 20 Nov 2018 13:59:09 -0800 Subject: isDisabled -> isInputDisabled --- packages/instant/src/components/erc20_asset_amount_input.tsx | 7 ++++--- .../src/containers/selected_erc20_asset_amount_input.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'packages/instant/src') diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index e675d3fc5..b825255c4 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -22,7 +22,7 @@ export interface ERC20AssetAmountInputProps { onSelectAssetClick?: (asset?: ERC20Asset) => void; startingFontSizePx: number; fontColor?: ColorOption; - isDisabled: boolean; + isInputDisabled: boolean; canSelectOtherAsset: boolean; numberOfAssetsAvailable?: number; } @@ -51,14 +51,15 @@ export class ERC20AssetAmountInput extends React.Component { - const { onChange, ...rest } = this.props; - const amountBorderBottom = this.props.isDisabled ? '' : `1px solid ${transparentWhite}`; + const { onChange, isInputDisabled, ...rest } = this.props; + const amountBorderBottom = isInputDisabled ? '' : `1px solid ${transparentWhite}`; const onSymbolClick = this._generateSelectAssetClickHandler(); return ( { const processState = state.buyOrderState.processState; - const isEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure; - const isDisabled = !isEnabled; + const isInputEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure; + const isInputDisabled = !isInputEnabled; const selectedAsset = !_.isUndefined(state.selectedAsset) && state.selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20 ? (state.selectedAsset as ERC20Asset) @@ -53,7 +53,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP const numberOfAssetsAvailable = _.isUndefined(state.availableAssets) ? undefined : state.availableAssets.length; const canSelectOtherAsset = numberOfAssetsAvailable && numberOfAssetsAvailable > 1 - ? isEnabled || processState === OrderProcessState.Success + ? isInputEnabled || processState === OrderProcessState.Success : false; const assetBuyer = state.providerState.assetBuyer; @@ -61,7 +61,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP assetBuyer, value: state.selectedAssetUnitAmount, asset: selectedAsset, - isDisabled, + isInputDisabled, numberOfAssetsAvailable, affiliateInfo: state.affiliateInfo, canSelectOtherAsset, @@ -109,7 +109,7 @@ const mergeProps = ( onChange: (value, asset) => { connectedDispatch.updateBuyQuote(connectedState.assetBuyer, value, asset, connectedState.affiliateInfo); }, - isDisabled: connectedState.isDisabled, + isInputDisabled: connectedState.isInputDisabled, numberOfAssetsAvailable: connectedState.numberOfAssetsAvailable, canSelectOtherAsset: connectedState.canSelectOtherAsset, }; -- cgit v1.2.3