1.0.13 • Published 6 months ago

direct-drop-area v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

direct-drop-area

react based component converting the element to a drop zone for file upload or manipulations supporting direct web image drop Supporting multiple drop as well

sample

Installation

npm i direct-drop-area
import { DirectDropArea } from 'direct-drop-area'
const acceptedFilesType = 'image/*'; // accepted file types
(<DirectDropArea
    dontRead
    accept={acceptedFilesType}
    onDrop={(file) => console.log(file)}
    handleClick={false}>
    {({over, overDocument}) => (
        <div
            style={{
                width: '600px',
                height: '200px',
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                border: "5px solid black",
                ...(over
                    ? {opacity: '50%', border: '5px dashed #259925'}
                    : {}),
            }}
        >
            this is a drop zone 
        </div>)}
</DirectDropArea>)

For contributions

$ git clone https://github.com/sreenathch/direct-drop-area.git
$ cd direct-drop-area
$ yarn install

Scripts

Running locally

$ yarn start
1.0.13

6 months ago

1.0.12

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago