Update EthWrappers component

This commit is contained in:
Brandon Millman
2018-06-05 23:18:26 -07:00
parent 61dc253de1
commit 03854baf53
2 changed files with 7 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ interface EthWrappersProps {
userAddress: string;
userEtherBalanceInWei?: BigNumber;
lastForceTokenStateRefetch: number;
isFullWidth?: boolean;
}
interface EthWrappersState {
@@ -43,6 +44,9 @@ interface EthWrappersState {
}
export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersState> {
public static defaultProps: Partial<EthWrappersProps> = {
isFullWidth: false,
};
private _isUnmounted: boolean;
constructor(props: EthWrappersProps) {
super(props);
@@ -97,8 +101,9 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
this.props.userEtherBalanceInWei,
constants.DECIMAL_PLACES_ETH,
);
const rootClassName = this.props.isFullWidth ? 'clearfix' : 'clearfix lg-px4 md-px4 sm-px2';
return (
<div className="clearfix lg-px4 md-px4 sm-px2" style={{ minHeight: 600 }}>
<div className={rootClassName} style={{ minHeight: 600 }}>
<div className="relative">
<h3>ETH Wrapper</h3>
<div className="absolute" style={{ top: 0, right: 0 }}>

View File

@@ -430,6 +430,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
userAddress={this.props.userAddress}
userEtherBalanceInWei={this.props.userEtherBalanceInWei}
lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
isFullWidth={true}
/>
);
}