-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(drag-and-drop): drag and drop a data file to create a dataset
First, we add `showDragDrop` state to the App component. This will get refactored to the state tree. We add a `onDragEnter` handler to the App div. This event will trigger the `drag-drop` div mask to render (this should also get refactored to a separate component, potentially). Currently we have `onDragEnter`, `onDragOver`, `onDragLeave`, and `onDrop` handler attached to the `drag-drop` div mask. `onDragLeave` and `onDrop` close the `drag-drop` mask. This thread was very helpful: https://stackoverflow.com/questions/19841859/full-page-drag-and-drop-files-website
- Loading branch information
Showing
4 changed files
with
65 additions
and
8 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
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,13 @@ | ||
.drag-drop { | ||
background: rgba($color: #000000, $alpha: .6); | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
bottom: 0; | ||
} |
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