diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-06 13:48:13 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-06 16:33:35 +0800 |
commit | 3f19ab1a87b3015923688669d1068f5619485da2 (patch) | |
tree | 1fd160aa358541b299e18cd2a9ebe2ff32fe02ab /packages/website/ts/components/token_balances.tsx | |
parent | 39570a9663abae56b0220745306386197fae65c1 (diff) | |
download | dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar.gz dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar.bz2 dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar.lz dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar.xz dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.tar.zst dexon-0x-contracts-3f19ab1a87b3015923688669d1068f5619485da2.zip |
Add isFullWidth prop to TokenBalances component
Diffstat (limited to 'packages/website/ts/components/token_balances.tsx')
-rw-r--r-- | packages/website/ts/components/token_balances.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 2bc065b0f..f313cd27e 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -73,6 +73,7 @@ interface TokenBalancesProps { userEtherBalanceInWei: BigNumber; networkId: number; lastForceTokenStateRefetch: number; + isFullWidth?: boolean; } interface TokenBalancesState { @@ -87,6 +88,7 @@ interface TokenBalancesState { export class TokenBalances extends React.Component<TokenBalancesProps, TokenBalancesState> { public static defaultProps: Partial<TokenBalancesProps> = { userEtherBalanceInWei: new BigNumber(0), + isFullWidth: false, }; private _isUnmounted: boolean; public constructor(props: TokenBalancesProps) { @@ -187,8 +189,9 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala this.props.userEtherBalanceInWei, constants.DECIMAL_PLACES_ETH, ); + const rootClassName = this.props.isFullWidth ? 'pb2' : 'lg-px4 md-px4 sm-px1 pb2'; return ( - <div className="lg-px4 md-px4 sm-px1 pb2"> + <div className={rootClassName}> <h3>{isTestNetwork ? 'Test ether' : 'Ether'}</h3> <Divider /> <div className="pt2 pb2"> |