aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/fill_order.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-06 14:34:20 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-06 16:33:35 +0800
commit1677817d9fb31d47080705fc4336555f74cbe687 (patch)
treea827aaf67dcd898e38cec74b8ef477b8ea072276 /packages/website/ts/components/fill_order.tsx
parent03854baf53c5767db7130b8f6d7e91aae015e867 (diff)
downloaddexon-0x-contracts-1677817d9fb31d47080705fc4336555f74cbe687.tar.gz
dexon-0x-contracts-1677817d9fb31d47080705fc4336555f74cbe687.tar.zst
dexon-0x-contracts-1677817d9fb31d47080705fc4336555f74cbe687.zip
Update GenerateOrderForm and FillOrder components
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..e313a43fe 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;
+ shouldRenderHeader?: boolean;
}
interface FillOrderState {
@@ -61,6 +63,10 @@ interface FillOrderState {
}
export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
+ public static defaultProps: Partial<FillOrderProps> = {
+ isFullWidth: false,
+ shouldRenderHeader: true,
+ };
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.shouldRenderHeader && (
+ <div>
+ <h3>Fill an order</h3>
+ <Divider />
+ </div>
+ )}
<div>
{!this.props.isOrderInUrl && (
<div>