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

Version Path
playbook_ui_docs-13.32.0 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.32.0 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.powercentrainplaybookpt23212 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.powercentrainplaybookpt23212 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY10863202 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.PLAY10863202 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.play1262iconstyles3172 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3172 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0.pre.alpha.play1262iconstyles3171 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3171 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.31.0 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.31.0 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.30.0.pre.alpha.play1367contenttagnoninputkits3159 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.30.0.pre.alpha.play1367contenttagnoninputkits3159 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui_docs-13.30.0.pre.alpha.20240515remotebuildkitconversion3150 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
playbook_ui-13.30.0.pre.alpha.20240515remotebuildkitconversion3150 app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx