diff --git a/browser/components/NoteItem.js b/browser/components/NoteItem.js index 24ac2437..77e09eed 100644 --- a/browser/components/NoteItem.js +++ b/browser/components/NoteItem.js @@ -40,9 +40,10 @@ const TagElementList = (tags) => { * @param {Object} note * @param {Function} handleNoteClick * @param {Function} handleNoteContextMenu + * @param {Function} handleDragStart * @param {string} dateDisplay */ -const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteContextMenu }) => ( +const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteContextMenu, 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' @@ -91,7 +94,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..2054f074 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..ab2616fb 100644 --- a/browser/components/StorageItem.js +++ b/browser/components/StorageItem.js @@ -14,11 +14,14 @@ import { isNumber } from 'lodash' * @param {string} folderColor * @param {boolean} isFolded * @param {number} noteCount + * @param {Function} handleDrop + * @param {Function} handleDragEnter + * @param {Function} handleDragOut * @return {React.Component} */ const StorageItem = ({ isActive, handleButtonClick, handleContextMenu, folderName, - folderColor, isFolded, noteCount + folderColor, isFolded, noteCount, handleDrop, handleDragEnter, handleDragLeave }) => (