From ecae3f9c4852ba488ab5a0777dae2f7a9c45ddc0 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 5 Nov 2018 17:19:37 -0800 Subject: wip: full display of mobile hard coded --- packages/instant/public/index.html | 2 +- packages/instant/src/components/order_details.tsx | 2 +- packages/instant/src/components/ui/container.tsx | 3 +++ packages/instant/src/components/ui/flex.tsx | 2 ++ packages/instant/src/components/ui/overlay.tsx | 4 ++-- packages/instant/src/components/zero_ex_instant_container.tsx | 6 ++++-- 6 files changed, 13 insertions(+), 6 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index cf9e0eda0..418e6261f 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -13,7 +13,7 @@ display: flex; justify-content: center; align-items: center; - height: 100vh; + /*height: 100vh;*/ } body { diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 704009d89..2d98adf7e 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -23,7 +23,7 @@ export class OrderDetails extends React.Component { const ethTokenFee = buyQuoteAccessor.feeEthAmount(); const totalEthAmount = buyQuoteAccessor.totalEthAmount(); return ( - + ` box-sizing: border-box; + ${props => cssRuleIfExists(props, 'flex-grow')} ${props => cssRuleIfExists(props, 'display')} ${props => cssRuleIfExists(props, 'position')} ${props => cssRuleIfExists(props, 'top')} diff --git a/packages/instant/src/components/ui/flex.tsx b/packages/instant/src/components/ui/flex.tsx index 29c6511bb..57abd8b5b 100644 --- a/packages/instant/src/components/ui/flex.tsx +++ b/packages/instant/src/components/ui/flex.tsx @@ -10,6 +10,7 @@ export interface FlexProps { height?: string; backgroundColor?: ColorOption; inline?: boolean; + flexGrow?: number | string; } export const Flex = @@ -19,6 +20,7 @@ export const Flex = display: ${props => (props.inline ? 'inline-flex' : 'flex')}; flex-direction: ${props => props.direction}; flex-wrap: ${props => props.flexWrap}; + ${props => cssRuleIfExists(props, 'flexGrow')} justify-content: ${props => props.justify}; align-items: ${props => props.align}; ${props => cssRuleIfExists(props, 'width')} diff --git a/packages/instant/src/components/ui/overlay.tsx b/packages/instant/src/components/ui/overlay.tsx index f1706c874..e930ffacd 100644 --- a/packages/instant/src/components/ui/overlay.tsx +++ b/packages/instant/src/components/ui/overlay.tsx @@ -14,11 +14,11 @@ export interface OverlayProps { } const PlainOverlay: React.StatelessComponent = ({ children, className, onClose }) => ( - + -
{children}
+ {children}
); export const Overlay = styled(PlainOverlay)` diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index c1bd17502..cf7a04554 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -14,6 +14,7 @@ import { zIndex } from '../style/z_index'; import { SlideAnimationState } from './animations/slide_animation'; import { SlidingPanel } from './sliding_panel'; import { Container, Flex } from './ui'; + export interface ZeroExInstantContainerProps {} export interface ZeroExInstantContainerState { tokenSelectionPanelAnimationState: SlideAnimationState; @@ -25,7 +26,7 @@ export class ZeroExInstantContainer extends React.Component + @@ -36,8 +37,9 @@ export class ZeroExInstantContainer extends React.Component - + -- cgit