Skip to content

CSVReader (Drag to Upload) Style

Bunlong VAN edited this page Aug 1, 2020 · 5 revisions

Sample

<CSVReader
  onDrop={this.handleOnDrop}
  onError={this.handleOnError}
  addRemoveButton
  onRemoveFile={this.handleOnRemoveFile}
  style={{
    dropArea: {
      borderStyle: 'dashed',
      borderColor: '#ccc',
      borderRadius: 20,
      borderWidth: 2,
      backgroundColor: '#ccc',
    },
    dropFile: {
      width: 100,
      height: 120,
      background: '#ccc',
      fileSizeInfo: {
        color: '#fff',
        backgroundColor: '#000',
        borderRadius: 3,
        lineHeight: 1,
        marginBottom: '0.5em',
        padding: '0 0.4em',
      },
      fileNameInfo: {
        color: '#fff',
        backgroundColor: '#eee',
        borderRadius: 3,
        fontSize: 14,
        lineHeight: 1,
        padding: '0 0.4em',
      },
      removeButton: {
        color: 'blue',
      },
      progressBar: {
        backgroundColor: 'pink',
      }
    },
  }}
>
  <span>Click to upload.</span>
</CSVReader>
Clone this wiki locally