aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/trade_history/trade_history.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-06-07 07:12:47 +0800
committerGitHub <noreply@github.com>2018-06-07 07:12:47 +0800
commit5989844f1c3d00f57f1ab86a00aa97e17751c576 (patch)
tree35e5f4042e9e7d0ffaec51d1aa94430dae1ca83f /packages/website/ts/components/trade_history/trade_history.tsx
parent785b9811f30869f01242ce9ff81c282bf7f5352f (diff)
parent14e3f413a23f9ee41d880539f98e2957708b035f (diff)
downloaddexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar.gz
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar.bz2
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar.lz
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar.xz
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.tar.zst
dexon-sol-tools-5989844f1c3d00f57f1ab86a00aa97e17751c576.zip
Merge pull request #672 from 0xProject/feature/website/account-management-polish
Account management polish
Diffstat (limited to 'packages/website/ts/components/trade_history/trade_history.tsx')
-rw-r--r--packages/website/ts/components/trade_history/trade_history.tsx29
1 files changed, 23 insertions, 6 deletions
diff --git a/packages/website/ts/components/trade_history/trade_history.tsx b/packages/website/ts/components/trade_history/trade_history.tsx
index 1ca9d866f..84c0f70a8 100644
--- a/packages/website/ts/components/trade_history/trade_history.tsx
+++ b/packages/website/ts/components/trade_history/trade_history.tsx
@@ -13,6 +13,9 @@ interface TradeHistoryProps {
tokenByAddress: TokenByAddress;
userAddress: string;
networkId: number;
+ isFullWidth?: boolean;
+ shouldHideHeader?: boolean;
+ isScrollable?: boolean;
}
interface TradeHistoryState {
@@ -20,6 +23,11 @@ interface TradeHistoryState {
}
export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistoryState> {
+ public static defaultProps: Partial<TradeHistoryProps> = {
+ isFullWidth: false,
+ shouldHideHeader: false,
+ isScrollable: true,
+ };
private _fillPollingIntervalId: number;
public constructor(props: TradeHistoryProps) {
super(props);
@@ -38,13 +46,22 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
window.scrollTo(0, 0);
}
public render(): React.ReactNode {
+ const rootClassName = !this.props.isFullWidth ? 'lg-px4 md-px4 sm-px2' : undefined;
return (
- <div className="lg-px4 md-px4 sm-px2">
- <h3>Trade history</h3>
- <Divider />
- <div className="pt2" style={{ height: 608, overflow: 'scroll' }}>
- {this._renderTrades()}
- </div>
+ <div className={rootClassName}>
+ {!this.props.shouldHideHeader && (
+ <div>
+ <h3>Trade history</h3>
+ <Divider />
+ </div>
+ )}
+ {this.props.isScrollable ? (
+ <div className="pt2" style={{ height: 608, overflow: 'scroll' }}>
+ {this._renderTrades()}
+ </div>
+ ) : (
+ this._renderTrades()
+ )}
</div>
);
}