aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/fill_order.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-07 07:43:37 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-07 07:43:37 +0800
commit64906a1ba5cefbb153250d4e6c9f39a8aee60c21 (patch)
tree6eb457e4ecf4698257a6816ee070687ff85cbfba /packages/website/ts/components/fill_order.tsx
parente75721016e35a07b52d2f164d860c3e18b1d4261 (diff)
parent5989844f1c3d00f57f1ab86a00aa97e17751c576 (diff)
downloaddexon-sol-tools-64906a1ba5cefbb153250d4e6c9f39a8aee60c21.tar.gz
dexon-sol-tools-64906a1ba5cefbb153250d4e6c9f39a8aee60c21.tar.zst
dexon-sol-tools-64906a1ba5cefbb153250d4e6c9f39a8aee60c21.zip
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting
Diffstat (limited to 'packages/website/ts/components/fill_order.tsx')
-rw-r--r--packages/website/ts/components/fill_order.tsx17
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index 0168ec8f6..b6b52993e 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -39,6 +39,8 @@ interface FillOrderProps {
initialOrder: Order;
dispatcher: Dispatcher;
lastForceTokenStateRefetch: number;
+ isFullWidth?: boolean;
+ shouldHideHeader?: boolean;
}
interface FillOrderState {
@@ -61,6 +63,10 @@ interface FillOrderState {
}
export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
+ public static defaultProps: Partial<FillOrderProps> = {
+ isFullWidth: false,
+ shouldHideHeader: false,
+ };
private _isUnmounted: boolean;
constructor(props: FillOrderProps) {
super(props);
@@ -97,10 +103,15 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
this._isUnmounted = true;
}
public render(): React.ReactNode {
+ const rootClassName = this.props.isFullWidth ? 'clearfix' : 'lg-px4 md-px4 sm-px2';
return (
- <div className="clearfix lg-px4 md-px4 sm-px2" style={{ minHeight: 600 }}>
- <h3>Fill an order</h3>
- <Divider />
+ <div className={rootClassName} style={{ minHeight: 600 }}>
+ {!this.props.shouldHideHeader && (
+ <div>
+ <h3>Fill an order</h3>
+ <Divider />
+ </div>
+ )}
<div>
{!this.props.isOrderInUrl && (
<div>