Sha256: 13e99d9384882e38e584bcc1df25ae5018cfb3d868360503d77584217b12e80d
Contents?: true
Size: 716 Bytes
Versions: 944
Compression:
Stored size: 716 Bytes
Contents
import React, { useState } from 'react' import { FileUpload, List, ListItem, } from 'playbook-ui' const AcceptedFilesList = ({ files }) => ( <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
944 entries across 944 versions & 2 rubygems