Skip to content

unclechu/purescript-react-dropzone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

purescript-react-dropzone

PureScript FFI bindings for "react-dropzone" package.

It's work in progress, not published on pursuit yet, but it's working, I have used it in production. For now you can dirty copy-paste it or use as git-submodule.

Requirements

Usage example

Keep in mind that this example requires purescript-react-spaces.

dropzone ^^ dropzoneDefaultProps
  { multiple = false
  , accept   = toNullable $ Just "image/jpeg, image/png"

  , onDropAccepted = toNullable $ Just $ handle2 $
      \files _ -> case head files of
                       Nothing -> pure unit
                       Just x  -> onFileDropped x

  , onDropRejected = toNullable $ Just $ handle2 $
      \files _ -> onFilesRejected files
  }
  $ do
    p $ text "Try dropping some files here, or click to select files to upload."
    p $ text "Only *.jpeg and *.png images will be accepted."

Author

Viacheslav Lotsmanov

License

MIT

About

PureScript FFI bindings for "react-dropzone" package

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published