Skip to content

Commit b1691ba

Browse files
authored
Merge pull request #3 from N0tExisting/main
Fix Component Height & make the component more accesible
2 parents 1ffc964 + ca79e83 commit b1691ba

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

package.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
{
22
"name": "filedrop-svelte",
3-
"version": "0.0.10",
3+
"description": "svelte component and action to create drag-and-drop file dropzones.",
4+
"version": "0.0.11",
5+
"license": "MIT",
46
"author": {
57
"name": "chance dinkins",
68
"email": "[email protected]"
79
},
8-
"license": "mit",
10+
"contributors": [
11+
"not_existing"
12+
],
913
"repository": {
1014
"url": "https://github.com/chanced/filedrop-svelte",
1115
"type": "git"
1216
},
17+
"bugs": {
18+
"url": "https://github.com/chanced/filedrop-svelte/issues"
19+
},
1320
"keywords": [
1421
"svelte",
1522
"sveltekit",
@@ -18,18 +25,23 @@
1825
"file upload",
1926
"drag-and-drop"
2027
],
21-
"description": "svelte component and action to create drag-and-drop file dropzones.",
28+
"type": "module",
2229
"scripts": {
2330
"package": "svelte-kit package",
2431
"dev": "svelte-kit dev",
2532
"build": "svelte-kit build",
2633
"preview": "svelte-kit preview",
2734
"check": "svelte-check --tsconfig ./tsconfig.json",
2835
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
29-
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
36+
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
3037
"format": "prettier --write --plugin-search-dir=. .",
3138
"test": "playwright test"
3239
},
40+
"dependencies": {
41+
"file-selector": "^0.2.4",
42+
"filesize": "^7.0.0",
43+
"attr-accept": "^2.2.2"
44+
},
3345
"devDependencies": {
3446
"@playwright/test": "^1.13.0",
3547
"@sveltejs/kit": "next",
@@ -48,11 +60,5 @@
4860
"ts-node": "^10.1.0",
4961
"tslib": "^2.0.0",
5062
"typescript": "^4.0.0"
51-
},
52-
"dependencies": {
53-
"file-selector": "^0.2.4",
54-
"filesize": "^7.0.0",
55-
"attr-accept": "^2.2.2"
56-
},
57-
"type": "module"
58-
}
63+
}
64+
}

src/lib/components/FileDrop/FileDrop.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
$: isMulti = (fileLimit === undefined || fileLimit > 1) && (multiple === undefined || multiple);
4545
</script>
4646

47-
<div
47+
<label
4848
{id}
4949
class:filedrop={!containerClass}
5050
use:filedrop={options}
@@ -63,12 +63,11 @@
6363
<slot>
6464
<p>Drag &amp; drop or select to upload {isMulti ? "files" : "a file "}</p>
6565
</slot>
66-
</div>
66+
</label>
6767

6868
<style>
6969
.filedrop {
7070
background-color: #f0f0f0;
71-
height: 200px;
7271
display: flex;
7372
flex-direction: column;
7473
align-items: center;

0 commit comments

Comments
 (0)