Created
February 18, 2019 23:05
-
-
Save jerolan/9ec9376459097f04623a2ee498bf9d03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { render, Document, Artboard, Page } from 'react-sketchapp'; | |
| import ThemeProvider from './components/ThemeProvider'; | |
| import CardEventResume from './components/CardEventResume'; | |
| import Card from './components/Card'; | |
| import event from '../event.json'; | |
| function CardPage(props) { | |
| return ( | |
| <Page style={{ flexDirection: 'row' }}> | |
| {props.talks.map(talk => ( | |
| <Artboard style={{ marginHorizontal: 20 }}> | |
| <Card | |
| date={props.eventInfo.date} | |
| time={props.eventInfo.time} | |
| place={props.eventInfo.place} | |
| title={talk.title} | |
| name={talk.name} | |
| image={talk.image} | |
| /> | |
| </Artboard> | |
| ))} | |
| <Artboard> | |
| <CardEventResume | |
| date={props.eventInfo.date} | |
| time={props.eventInfo.time} | |
| place={props.eventInfo.place} | |
| talks={props.talks} | |
| /> | |
| </Artboard> | |
| </Page> | |
| ); | |
| } | |
| function MDocument(props) { | |
| return ( | |
| <ThemeProvider> | |
| <Document> | |
| <CardPage eventInfo={props.data.info} talks={props.data.speakers} /> | |
| </Document> | |
| </ThemeProvider> | |
| ); | |
| } | |
| export default () => { | |
| render(<MDocument data={event} />); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment