0.1.5 • Published 8 months ago

react-native-viewdrop-ios v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

react-native-viewdrop-ios

ViewDrop is a module for React Native that will allow View to use a native iOS feature to transfer pictures, videos, files, and more through a simple Drag & Drop action.

Installation

npm install react-native-viewdrop-ios

Usage

import { ViewDrop } from 'react-native-viewdrop-ios';

// ...

<ViewDrop style={styles.container}
    onImageReceived={setImage}
    onDropItemDetected={() => some logic for start dropping}
    onVideoReceived={({fileName : string, fullUrl : string}) => {
      some logic with path of video file
    }}
    onAudioReceived={({fileName : string, fullUrl : string}) => {
      some logic with path of audio file
    }}
>
  // your views
</ViewDrop>;
MethodDescription
onImageReceived( image : base64_string ) => void
onDropItemDetected() => void
onVideoReceived( fileName : string, fullUrl : string ) => void
onAudioReceived( fileName : string, fullUrl : string ) => void

Future Plans

  • Add file drops (such as doc, txt, pdf e.t.c.)
  • Add option like whiteList for dropping to view
  • Settings for resize images
  • Maybe whiteList for extensions of files (jpeg,png,mov e.t.c.)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.1.4

8 months ago

0.1.5

8 months ago

0.1.2

11 months ago

0.1.3

11 months ago

0.1.1

1 year ago

0.1.0

2 years ago