Jayden Seric 6492ba8fef Componentization improvements.
- Using a new component for sections.
- Renamed “multi” to “multiple” in the uploader name, to match the input attribute “multiple”.
2017-04-09 13:13:39 +10:00

35 lines
996 B
JavaScript

import Head from 'next/head'
import withData from '../helpers/with-data'
import Section from '../components/section'
import SingleUploader from '../components/single-uploader'
import MultipleUploader from '../components/multiple-uploader'
import UploadList from '../components/upload-list'
export default withData(props => (
<div>
<Head>
<title>Apollo upload examples</title>
<style>{`
html {
font-family: sans-serif;
}
body {
margin: 2em;
}
`}</style>
</Head>
<h1>Apollo upload examples</h1>
<Section heading='Single file upload'>
<p>Select an image to upload and view the response in the console.</p>
<SingleUploader />
</Section>
<Section heading='Multiple file upload'>
<p>Select multiple images to upload and view the response in the console.</p>
<MultipleUploader />
</Section>
<Section heading='Uploaded files'>
<UploadList />
</Section>
</div>
))