client/src/components/NotesList.js
author duong tam kien <tk@deveha.com>
Tue, 23 May 2017 16:42:07 +0200
changeset 4 885a20cde527
parent 2 b52921a63e77
child 12 48ddaa42b810
permissions -rw-r--r--
zoning

import React from 'react';

import PropTypes from 'prop-types';
import Immutable from 'immutable';

import { ListGroup, ListGroupItem} from 'react-bootstrap';

import Note from './Note';

const NotesList = ({notes}) => {
  return (
    <ListGroup>
      {notes.map((note) => 
        <ListGroupItem key={note.id}><Note note={note} /></ListGroupItem>
      )}
    </ListGroup>
  );
};

NotesList.propTypes = {
  notes: PropTypes.instanceOf(Immutable.List).isRequired
};

export default NotesList;