From fa18db84d976644270adf0815c73a8d6f40cf9a8 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 15 Oct 2018 17:33:27 -0700 Subject: Rename OrderDetailsRow to EthAmountRow --- packages/instant/src/components/order_details.tsx | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 66e7e2406..9256d1398 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -32,15 +32,15 @@ export class OrderDetails extends React.Component { Order Details - - - + { } } -export interface OrderDetailsRowProps { - name: string; +export interface EthAmountRowProps { + rowLabel: string; ethAmount?: BigNumber; - shouldConvertEthToUnitAmount?: boolean; + isEthAmountInBaseUnits?: boolean; ethUsdPrice?: BigNumber; shouldEmphasize?: boolean; } -export const OrderDetailsRow: React.StatelessComponent = ({ - name, +export const EthAmountRow: React.StatelessComponent = ({ + rowLabel, ethAmount, - shouldConvertEthToUnitAmount, + isEthAmountInBaseUnits, ethUsdPrice, shouldEmphasize, }) => { const fontWeight = shouldEmphasize ? 700 : 400; - const usdFormatter = shouldConvertEthToUnitAmount ? format.ethBaseAmountInUsd : format.ethUnitAmountInUsd; - const ethFormatter = shouldConvertEthToUnitAmount ? format.ethBaseAmount : format.ethUnitAmount; + const usdFormatter = isEthAmountInBaseUnits ? format.ethBaseAmountInUsd : format.ethUnitAmountInUsd; + const ethFormatter = isEthAmountInBaseUnits ? format.ethBaseAmount : format.ethUnitAmount; return ( - {name} + {rowLabel} @@ -87,9 +87,9 @@ export const OrderDetailsRow: React.StatelessComponent = ( ); }; -OrderDetailsRow.defaultProps = { +EthAmountRow.defaultProps = { shouldEmphasize: false, - shouldConvertEthToUnitAmount: true, + isEthAmountInBaseUnits: true, }; -OrderDetailsRow.displayName = 'OrderDetailsRow'; +EthAmountRow.displayName = 'EthAmountRow'; -- cgit