Change shouldRenderHeader prop to shouldHideHeader

This commit is contained in:
Brandon Millman
2018-06-06 16:11:23 -07:00
parent 2b4cd8b2ec
commit 14e3f413a2
5 changed files with 13 additions and 13 deletions

View File

@@ -40,7 +40,7 @@ interface FillOrderProps {
dispatcher: Dispatcher;
lastForceTokenStateRefetch: number;
isFullWidth?: boolean;
shouldRenderHeader?: boolean;
shouldHideHeader?: boolean;
}
interface FillOrderState {
@@ -65,7 +65,7 @@ interface FillOrderState {
export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
public static defaultProps: Partial<FillOrderProps> = {
isFullWidth: false,
shouldRenderHeader: true,
shouldHideHeader: false,
};
private _isUnmounted: boolean;
constructor(props: FillOrderProps) {
@@ -106,7 +106,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
const rootClassName = this.props.isFullWidth ? 'clearfix' : 'lg-px4 md-px4 sm-px2';
return (
<div className={rootClassName} style={{ minHeight: 600 }}>
{this.props.shouldRenderHeader && (
{!this.props.shouldHideHeader && (
<div>
<h3>Fill an order</h3>
<Divider />

View File

@@ -48,7 +48,7 @@ interface GenerateOrderFormProps {
tokenByAddress: TokenByAddress;
lastForceTokenStateRefetch: number;
isFullWidth?: boolean;
shouldRenderHeader?: boolean;
shouldHideHeader?: boolean;
}
interface GenerateOrderFormState {
@@ -60,7 +60,7 @@ interface GenerateOrderFormState {
export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, GenerateOrderFormState> {
public static defaultProps: Partial<GenerateOrderFormProps> = {
isFullWidth: false,
shouldRenderHeader: true,
shouldHideHeader: false,
};
constructor(props: GenerateOrderFormProps) {
super(props);
@@ -89,7 +89,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G
const rootClassName = this.props.isFullWidth ? 'clearfix mb2' : 'clearfix mb2 lg-px4 md-px4 sm-px2';
return (
<div className={rootClassName}>
{this.props.shouldRenderHeader && (
{!this.props.shouldHideHeader && (
<div>
<h3>Generate an order</h3>
<Divider />

View File

@@ -441,7 +441,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
userAddress={this.props.userAddress}
networkId={this.props.networkId}
isFullWidth={true}
shouldRenderHeader={false}
shouldHideHeader={true}
isScrollable={false}
/>
);
@@ -453,7 +453,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
hashData={this.props.hashData}
dispatcher={this.props.dispatcher}
isFullWidth={true}
shouldRenderHeader={false}
shouldHideHeader={true}
/>
);
}
@@ -474,7 +474,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
dispatcher={this.props.dispatcher}
lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
isFullWidth={true}
shouldRenderHeader={false}
shouldHideHeader={true}
/>
);
}

View File

@@ -14,7 +14,7 @@ interface TradeHistoryProps {
userAddress: string;
networkId: number;
isFullWidth?: boolean;
shouldRenderHeader?: boolean;
shouldHideHeader?: boolean;
isScrollable?: boolean;
}
@@ -25,7 +25,7 @@ interface TradeHistoryState {
export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistoryState> {
public static defaultProps: Partial<TradeHistoryProps> = {
isFullWidth: false,
shouldRenderHeader: true,
shouldHideHeader: false,
isScrollable: true,
};
private _fillPollingIntervalId: number;
@@ -49,7 +49,7 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
const rootClassName = !this.props.isFullWidth ? 'lg-px4 md-px4 sm-px2' : undefined;
return (
<div className={rootClassName}>
{this.props.shouldRenderHeader && (
{!this.props.shouldHideHeader && (
<div>
<h3>Trade history</h3>
<Divider />

View File

@@ -14,7 +14,7 @@ interface GenerateOrderFormProps {
hashData: HashData;
dispatcher: Dispatcher;
isFullWidth?: boolean;
shouldRenderHeader?: boolean;
shouldHideHeader?: boolean;
}
interface ConnectedState {