From 4ebddcc186432803cbd0471f668cfe33d5531b83 Mon Sep 17 00:00:00 2001 From: Tilman Frick Date: Mon, 11 Feb 2019 16:21:28 +0100 Subject: [PATCH] fix: set correct display for layout --- src/layout/layout.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layout/layout.tsx b/src/layout/layout.tsx index 6a53ee9..07a632a 100644 --- a/src/layout/layout.tsx +++ b/src/layout/layout.tsx @@ -8,6 +8,7 @@ export interface LayoutProps { /** @name Background color @default transparent */ backgroundColor?: string; center?: boolean; children?: React.ReactNode; + className?: string; } export enum LayoutDirection { @@ -16,10 +17,10 @@ export enum LayoutDirection { } export const Layout = styled.div` - display: flex; + display: ${props => (props.direction === LayoutDirection.Vertical ? "block" : "flex")}; + position: relative; margin: 0 ${props => (props.center && "auto") || ""}; width: ${props => props.width || "auto"}; max-width: ${props => props.maxWidth || "none"}; background-color: ${props => props.backgroundColor || "none"}; - flex-direction: ${props => (props.direction === LayoutDirection.Vertical ? "column" : "row")}; `;