UNPKG

@proca/widget

Version:

Proca is an open-source campaign toolkit designed to empower activists and organisations in their digital advocacy efforts. It provides a flexible and customisable platform for creating and managing online petitions, email campaigns, and other forms of di

24 lines (21 loc) 594 B
import React, { useState } from "react"; import { DropzoneArea } from "material-ui-dropzone"; const UploadFile = () => { const [message, setMessage] = useState(); return ( <> <div>{message}</div> <DropzoneArea fileLimit={1} acceptedFiles={["image/*"]} dropzoneText={"Drag and drop an image here or click"} onChange={files => { if (files.length === 0) return; setMessage("Message ready, press the send button below"); console.log("Files:", files); }} /> </> ); }; export default UploadFile;