From c8046fdcbcd1aff34704ed0d3b7e32e05f1bb8ca Mon Sep 17 00:00:00 2001 From: Alexander Peschel Date: Wed, 6 Dec 2017 14:46:58 +0100 Subject: [PATCH] feat(lsg): justify layout children --- src/lsg/patterns/layout/demo.tsx | 5 +++-- src/lsg/patterns/layout/index.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lsg/patterns/layout/demo.tsx b/src/lsg/patterns/layout/demo.tsx index c8e14396a..d46efc387 100644 --- a/src/lsg/patterns/layout/demo.tsx +++ b/src/lsg/patterns/layout/demo.tsx @@ -4,6 +4,7 @@ import * as React from 'react'; import styled from 'styled-components'; const StyledTestDiv = styled.div` + flex-grow: 1; padding: 20px 10px; background: ${colors.greenLight.toString()}; @@ -13,7 +14,7 @@ const StyledTestDiv = styled.div` `; const LayoutDemo: React.StatelessComponent = (): JSX.Element => ( - +
Vertical Vertical @@ -24,7 +25,7 @@ const LayoutDemo: React.StatelessComponent = (): JSX.Element => ( Horizontal Horizontal - +
); export default LayoutDemo; diff --git a/src/lsg/patterns/layout/index.tsx b/src/lsg/patterns/layout/index.tsx index f2cfe9edf..927569d19 100644 --- a/src/lsg/patterns/layout/index.tsx +++ b/src/lsg/patterns/layout/index.tsx @@ -8,6 +8,7 @@ export interface LayoutProps { const StyledLayout = styled.div` display: flex; + justify-content: space-between; ${(props: LayoutProps) => props.directionVertical ? 'flex-direction: column;' : ''