equal
deleted
inserted
replaced
1 import React, { Component } from 'react'; |
1 import React, { Component } from 'react'; |
2 import PropTypes from 'prop-types'; |
2 import PropTypes from 'prop-types'; |
3 import { FormControl } from 'react-bootstrap'; |
|
4 import { formatTimestamp } from '../utils'; |
3 import { formatTimestamp } from '../utils'; |
5 import SlateEditor from './SlateEditor'; |
4 import SlateEditor from './SlateEditor'; |
6 |
5 |
7 class Note extends Component { |
6 class Note extends Component { |
8 |
7 |
58 |
57 |
59 renderNoteMarginComment() { |
58 renderNoteMarginComment() { |
60 if (this.props.isEditing) { |
59 if (this.props.isEditing) { |
61 return ( |
60 return ( |
62 <div className="note-margin-comment"> |
61 <div className="note-margin-comment"> |
63 <FormControl |
62 <input type="text" className="form-control" |
64 name="margin" |
63 name="margin" |
65 componentClass="textarea" |
64 componentClass="textarea" |
66 placeholder="Enter a margin comment for your note" |
65 placeholder="Enter a margin comment for your note" |
67 defaultValue={ this.props.note.marginComment } |
66 defaultValue={ this.props.note.marginComment } |
68 inputRef={ ref => { this.marginComment = ref; } } /> |
67 // inputRef={ ref => { this.marginComment = ref; } } /> |
|
68 ref={(marginComment) => { this.marginComment = marginComment; }} /> |
69 </div> |
69 </div> |
70 ) |
70 ) |
71 } |
71 } |
72 |
72 |
73 return ( |
73 return ( |