Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Last active January 19, 2019 23:20
Show Gist options
  • Save marcelmokos/517c89875b659290a600a5eb1fff77e3 to your computer and use it in GitHub Desktop.
Save marcelmokos/517c89875b659290a600a5eb1fff77e3 to your computer and use it in GitHub Desktop.
Calendar.defaultProps
Calendar.defaultProps = {
Wrapper: styled.div`
display: flex;
flex-direction: row;
`,
Column: styled.div`
display: flex;
flex-direction: column;
margin: 0.5rem;
`,
Box: styled.div`
display: flex;
flex-direction: row;
`,
Item: styled.div`
width: 100%;
`,
headers: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
children: ({ Wrapper, Column, Box, Item, headers }) => (
<Wrapper>
{headers.map((header, index) => (
<Column>
{header}
<Box>
<Item>Item</Item>
<Item>Item</Item>
<Item>Item</Item>
</Box>
<Box>
<Item>Item</Item>
<Item>Item</Item>
<Item>Item</Item>
</Box>
</Column>
))}
</Wrapper>
)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment