summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/containers/Forms/Upload.js
blob: 99ef3bffb41b7a63bf7ec5b2a3bc5382c512f705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React from 'react';
import { Helmet } from 'react-helmet';
import brand from 'ba-api/brand';
import { withStyles } from '@material-ui/core/styles';
import { SourceReader, PapperBlock } from 'ba-components';
import { UploadInputAll, UploadInputImg, UploadInputBtn } from './demos';

const styles = ({
  root: {
    flexGrow: 1,
  }
});

class DateTime extends React.Component {
  render() {
    const title = brand.name + ' - Form';
    const description = brand.desc;
    const docSrc = 'containers/Forms/demos/';
    return (
      <div>
        <Helmet>
          <title>{title}</title>
          <meta name="description" content={description} />
          <meta property="og:title" content={title} />
          <meta property="og:description" content={description} />
          <meta property="twitter:title" content={title} />
          <meta property="twitter:description" content={description} />
        </Helmet>
        <PapperBlock title="Upload with Drop Zone" desc="Simple HTML5-compliant drag'n'drop zone for files built with React Drop Zone. The component containing a file upload (dropzone) area, images and files preview and some snazzy File Allowed/Not Allowed effects.">
          <div>
            <UploadInputAll />
            <SourceReader componentName={docSrc + 'UploadInputAll.js'} />
          </div>
        </PapperBlock>
        <PapperBlock title="Upload only Images" desc="This example allowing users to upload images only">
          <div>
            <UploadInputImg />
            <SourceReader componentName={docSrc + 'UploadInputImg.js'} />
          </div>
        </PapperBlock>
        <PapperBlock title="Upload Button" desc="Trigger upload file via button with ref attribute">
          <div>
            <UploadInputBtn />
            <SourceReader componentName={docSrc + 'UploadInputBtn.js'} />
          </div>
        </PapperBlock>
      </div>
    );
  }
}

export default withStyles(styles)(DateTime);