diff -r a6bd1aaddc34 -r 6f2999873343 client/src/components/Note.js --- a/client/src/components/Note.js Fri Jun 23 15:21:43 2017 +0200 +++ b/client/src/components/Note.js Fri Jun 23 15:57:35 2017 +0200 @@ -42,6 +42,13 @@ this.setState({ edit: false }) } + onClickClose = (e) => { + e.preventDefault(); + e.stopPropagation(); + + this.setState({ edit: false }) + } + renderNoteContent() { if (this.state.edit) { return ( @@ -58,6 +65,22 @@ ) } + renderNoteRight() { + if (this.state.edit) { + return ( + + close + + ); + } + + return ( + + delete + + ) + } + render() { return (
@@ -67,9 +90,7 @@
{ this.props.note.marginComment }
- - delete - + { this.renderNoteRight() }
); };