1.0.0 • Published 6 years ago

@j154004/react-image-upload-dialog v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

React Image Upload Dialog

React based image upload dialog component.

Click here for demo.

Installation

Install the package from npm:

npm install --save @j154004/react-image-upload-dialog

Usage

import ImageUploadDialog from '@j154004/react-image-upload-dialog';

Props

NameTypeDefaultDescription
openbooleanShow or hide the Dialog component.
onCancelfunctionCallback fired when "Cancel" button is clickedSignature:function(e: SyntheticEvent) => void
onUploadfunctionCallback fired when "Upload" button is clickedSignature:function(dialogState: Object) => voiddialogState: Object containing the accepted, rejected, alternativeText and title keys from the component state.

CSS API

You can override all the class names using the classes prop with the following keys:

NameDescription
textFieldStyles applied to the TextField components.
dropzoneStyles applied to the Dropzone component.
imageMetadataStyles applied to the ImageMetadata component.