client/src/components/Note.js
author Alexandre Segura <mex.zktk@gmail.com>
Thu, 01 Jun 2017 19:01:03 +0200
changeset 18 dab2a16500e0
parent 17 877d8796b86d
child 33 238818343253
permissions -rw-r--r--
Add some styles for note timings.

import React from 'react';
import PropTypes from 'prop-types';

const Note = ({note}) => {
  return (
    <div id={"note-" + note.id} className="note">
      <span className="start">{note.startedAt}</span>
      <span className="finish">{note.finishedAt}</span>
      <div dangerouslySetInnerHTML={{ __html: note.html }} />
    </div>
  );
};

Note.propTypes = {
  note: PropTypes.object.isRequired
};

export default Note;