Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
feat(lsg): justify layout children
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpeschel committed Dec 6, 2017
1 parent 51ac9ed commit c8046fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lsg/patterns/layout/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()};
Expand All @@ -13,7 +14,7 @@ const StyledTestDiv = styled.div`
`;

const LayoutDemo: React.StatelessComponent<void> = (): JSX.Element => (
<Layout directionVertical={true}>
<div>
<Layout directionVertical={true}>
<StyledTestDiv>Vertical</StyledTestDiv>
<StyledTestDiv>Vertical</StyledTestDiv>
Expand All @@ -24,7 +25,7 @@ const LayoutDemo: React.StatelessComponent<void> = (): JSX.Element => (
<StyledTestDiv>Horizontal</StyledTestDiv>
<StyledTestDiv>Horizontal</StyledTestDiv>
</Layout>
</Layout>
</div>
);

export default LayoutDemo;
1 change: 1 addition & 0 deletions src/lsg/patterns/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface LayoutProps {

const StyledLayout = styled.div`
display: flex;
justify-content: space-between;
${(props: LayoutProps) => props.directionVertical
? 'flex-direction: column;'
: ''
Expand Down

0 comments on commit c8046fd

Please sign in to comment.