Sha256: 5a3618fb3dc6e45d19ebc697d9d83c234c6573e82498768c0d0aef9deb89b320
Contents?: true
Size: 791 Bytes
Versions: 824
Compression:
Stored size: 791 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 FileUploadCustomMessage = (props) => { const [filesToUpload, setFilesToUpload] = useState([]) const handleOnFilesAccepted = (files) => { setFilesToUpload([...filesToUpload, ...files]) } return ( <div> <AcceptedFilesList files={filesToUpload} {...props} /> <FileUpload customMessage="Playbook is awesome!" onFilesAccepted={handleOnFilesAccepted} {...props} /> </div> ) } export default FileUploadCustomMessage
Version data entries
824 entries across 824 versions & 2 rubygems