-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement * bump version
- Loading branch information
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import Dropzone from '../../../../src/lib/components/Dropzone.svelte'; | ||
let files = { | ||
accepted: [] as any[], | ||
rejected: [] as any[] | ||
}; | ||
function handleFilesSelect(e: any) { | ||
const { acceptedFiles, fileRejections } = e.detail; | ||
files.accepted = [...files.accepted, ...acceptedFiles]; | ||
files.rejected = [...files.rejected, ...fileRejections]; | ||
} | ||
function clickToUpload() { | ||
document.getElementById('xyz')!.click(); | ||
} | ||
</script> | ||
|
||
<section> | ||
<button on:click={clickToUpload}>Click to upload</button> | ||
<Dropzone on:drop={handleFilesSelect} id="xyz" /> | ||
|
||
<ol> | ||
{#each files.accepted as item} | ||
<li>{item.name}</li> | ||
{/each} | ||
</ol> | ||
</section> | ||
|
||
<style> | ||
section { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
flex: 1; | ||
} | ||
</style> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters