Make it possible to show figure in hero on the bottom on mobile
This commit is contained in:
@@ -17,6 +17,7 @@ interface Props {
|
|||||||
background?: React.ReactNode;
|
background?: React.ReactNode;
|
||||||
announcement?: AnnouncementProps;
|
announcement?: AnnouncementProps;
|
||||||
sectionPadding?: string;
|
sectionPadding?: string;
|
||||||
|
showFigureBottomMobile?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SectionProps {
|
interface SectionProps {
|
||||||
@@ -36,6 +37,7 @@ interface WrapProps {
|
|||||||
isCentered?: boolean;
|
isCentered?: boolean;
|
||||||
isFullWidth?: boolean;
|
isFullWidth?: boolean;
|
||||||
isCenteredMobile?: boolean;
|
isCenteredMobile?: boolean;
|
||||||
|
showFigureBottomMobile?: boolean;
|
||||||
}
|
}
|
||||||
const Wrap = styled.div<WrapProps>`
|
const Wrap = styled.div<WrapProps>`
|
||||||
width: calc(100% - 60px);
|
width: calc(100% - 60px);
|
||||||
@@ -52,6 +54,9 @@ const Wrap = styled.div<WrapProps>`
|
|||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
text-align: ${props => (props.isCenteredMobile ? `center` : 'left')};
|
text-align: ${props => (props.isCenteredMobile ? `center` : 'left')};
|
||||||
|
flex-direction: ${props => (props.showFigureBottomMobile ? 'column-reverse' : 'column')};
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -156,6 +161,7 @@ export class Hero extends React.Component<Props> {
|
|||||||
isCentered={!props.figure}
|
isCentered={!props.figure}
|
||||||
isFullWidth={props.isFullWidth}
|
isFullWidth={props.isFullWidth}
|
||||||
isCenteredMobile={props.isCenteredMobile}
|
isCenteredMobile={props.isCenteredMobile}
|
||||||
|
showFigureBottomMobile={props.showFigureBottomMobile}
|
||||||
>
|
>
|
||||||
{props.figure && <Content width="400px">{props.figure}</Content>}
|
{props.figure && <Content width="400px">{props.figure}</Content>}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Definition } from 'ts/components/definition';
|
|||||||
import { DocumentTitle } from 'ts/components/document_title';
|
import { DocumentTitle } from 'ts/components/document_title';
|
||||||
import { Hero } from 'ts/components/hero';
|
import { Hero } from 'ts/components/hero';
|
||||||
import { Icon, InlineIconWrap } from 'ts/components/icon';
|
import { Icon, InlineIconWrap } from 'ts/components/icon';
|
||||||
import { FlexWrap, Section } from 'ts/components/newLayout';
|
import { Section } from 'ts/components/newLayout';
|
||||||
import { SiteWrap } from 'ts/components/siteWrap';
|
import { SiteWrap } from 'ts/components/siteWrap';
|
||||||
import { Heading, Paragraph } from 'ts/components/text';
|
import { Heading, Paragraph } from 'ts/components/text';
|
||||||
import { CodeStepper } from 'ts/pages/cfl/code_stepper';
|
import { CodeStepper } from 'ts/pages/cfl/code_stepper';
|
||||||
@@ -84,16 +84,16 @@ export class CFL extends React.Component<Props> {
|
|||||||
<SiteWrap theme="dark">
|
<SiteWrap theme="dark">
|
||||||
<DocumentTitle {...documentConstants.CFL} />
|
<DocumentTitle {...documentConstants.CFL} />
|
||||||
<Hero
|
<Hero
|
||||||
title="Swap Tokens by tapping into 0x's networked liquidity pool"
|
title="Swap Tokens by tapping into 0x's networked liquidity"
|
||||||
isLargeTitle={false}
|
isLargeTitle={false}
|
||||||
isFullWidth={true}
|
isFullWidth={true}
|
||||||
description="Source liquidity for your DeFi users by filling orders at the best prices."
|
description="Source liquidity for your DeFi users by filling orders at the best prices."
|
||||||
|
showFigureBottomMobile={true}
|
||||||
figure={'TODO: LIQUIDITY DATA'}
|
figure={'TODO: LIQUIDITY DATA'}
|
||||||
actions={
|
actions={
|
||||||
<Button href={constants.CFL_DOCS} isInline={true}>
|
<Button href={constants.CFL_DOCS} isInline={true}>
|
||||||
Get Started
|
Get Started
|
||||||
</Button>
|
</Button>}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<Section bgColor="dark" isTextCentered={true}>
|
<Section bgColor="dark" isTextCentered={true}>
|
||||||
<InlineIconWrap>
|
<InlineIconWrap>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { Definition, DefinitionProps } from 'ts/components/definition';
|
import { Definition, DefinitionProps } from 'ts/components/definition';
|
||||||
import { CodeTab, TabbedCodeDemo, TabbedWrapper } from 'ts/components/tabbed_code_demo';
|
import { CodeTab, TabbedCodeDemo } from 'ts/components/tabbed_code_demo';
|
||||||
|
|
||||||
const StepperContainer = styled.div`
|
const StepperContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user