Sha256: 6625560535397dcf1c68c4f908279457088e6fbbc08162e81509385a74b2cc0a
Contents?: true
Size: 732 Bytes
Versions: 1065
Compression:
Stored size: 732 Bytes
Contents
/* @flow */ import React, { useState } from 'react' import { FileUpload, List, ListItem, } from '../..' const AcceptedFilesList = ({ files }: FileList) => ( <List> {files.map((file) => ( <ListItem key={file.name}>{file.name}</ListItem> ))} </List> ) const FileUploadDefault = (props) => { const [filesToUpload, setFilesToUpload] = useState([]) const handleOnFilesAccepted = (files) => { setFilesToUpload([...filesToUpload, ...files]) } return ( <div> <AcceptedFilesList files={filesToUpload} {...props} /> <FileUpload onFilesAccepted={handleOnFilesAccepted} {...props} /> </div> ) } export default FileUploadDefault
Version data entries
1,065 entries across 1,065 versions & 2 rubygems