Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Created January 18, 2019 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelmokos/b268b8029255d9ea6848c9b8f698f23b to your computer and use it in GitHub Desktop.
Save marcelmokos/b268b8029255d9ea6848c9b8f698f23b to your computer and use it in GitHub Desktop.
Calendar
import React from "react";
import ReactDOM from "react-dom";
import Calendar from "./components/Calendar";
const App = () => (
<>
<Calendar>
{({ 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>
)}
</Calendar>
</>
);
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment