@@ -94,7 +97,9 @@ NoteItem.propTypes = {
isStarred: PropTypes.bool.isRequired
}),
handleNoteClick: PropTypes.func.isRequired,
- handleNoteContextMenu: PropTypes.func.isRequired
+ handleNoteContextMenu: PropTypes.func.isRequired,
+ handleDragStart: PropTypes.func.isRequired,
+ handleDragEnd: PropTypes.func.isRequired
}
export default CSSModules(NoteItem, styles)
diff --git a/browser/components/NoteItemSimple.js b/browser/components/NoteItemSimple.js
index 27c71813..2ad27484 100644
--- a/browser/components/NoteItemSimple.js
+++ b/browser/components/NoteItemSimple.js
@@ -11,8 +11,9 @@ import styles from './NoteItemSimple.styl'
* @param {Object} note
* @param {Function} handleNoteClick
* @param {Function} handleNoteContextMenu
+ * @param {Function} handleDragStart
*/
-const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu }) => (
+const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenum, handleDragStart }) => (
handleNoteClick(e, `${note.storage}-${note.key}`)}
onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)}
+ onDragStart={e => handleDragStart(e, note)}
+ draggable="true"
>
{note.type === 'SNIPPET_NOTE'
@@ -43,7 +46,8 @@ NoteItemSimple.propTypes = {
title: PropTypes.string.isrequired
}),
handleNoteClick: PropTypes.func.isRequired,
- handleNoteContextMenu: PropTypes.func.isRequired
+ handleNoteContextMenu: PropTypes.func.isRequired,
+ handleDragStart: PropTypes.func.isRequired
}
export default CSSModules(NoteItemSimple, styles)
diff --git a/browser/components/StorageItem.js b/browser/components/StorageItem.js
index 9b5864db..6b6be754 100644
--- a/browser/components/StorageItem.js
+++ b/browser/components/StorageItem.js
@@ -14,11 +14,12 @@ import { isNumber } from 'lodash'
* @param {string} folderColor
* @param {boolean} isFolded
* @param {number} noteCount
+ * @param {Function} handleDrop
* @return {React.Component}
*/
const StorageItem = ({
isActive, handleButtonClick, handleContextMenu, folderName,
- folderColor, isFolded, noteCount
+ folderColor, isFolded, noteCount, handleDrop
}) => (