diff --git a/browser/components/NoteItem.js b/browser/components/NoteItem.js index 0a7318dc..f0736a0d 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" >
{dateDisplay}
@@ -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 }) => (