Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Readme #15

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ Install:
$ npm install --save @deltablot/dropzone
# or with yarn:
$ yarn add @deltablot/dropzone
# or with bun:
$ bun add @deltablot/dropzone
```

First argument is an element to bind to, second argument is the [`options`](./src/options.js) object.

Use as **ES6 module** (recommended):

```js
import { Dropzone } from "dropzone";
import { Dropzone } from "@deltablot/dropzone";
const dropzone = new Dropzone("#elementId", { url: "/file/post" });
```

Expand All @@ -55,6 +57,14 @@ bundlers](https://github.com/dropzone/dropzone-examples)

Note: this library must be used in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (works only over HTTPS or locally).

<hr>

**CSS**

```css
@import "@deltablot/dropzone/src/dropzone";
```

## Not using a package manager or bundler?

Use the standalone files like this:
Expand Down
14 changes: 8 additions & 6 deletions src/dropzone.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@

$image-border-radius: 20px;

min-height: 150px;
border: 1px solid rgba(0, 0, 0, 0.8);
border-radius: 5px;
padding: 20px 20px;

&.dz-clickable {
cursor: pointer;

Expand All @@ -62,10 +67,7 @@
}
}

min-height: 150px;
border: 1px solid rgba(0, 0, 0, 0.8);
border-radius: 5px;
padding: 20px 20px;


&.dz-started {
.dz-message {
Expand Down Expand Up @@ -185,11 +187,11 @@
}
}
&:not(:hover) {
overflow: hidden;
text-overflow: ellipsis;
span {
border: 1px solid transparent;
}
overflow: hidden;
text-overflow: ellipsis;
}

}
Expand Down