client/src/components/NotesList.js
changeset 2 b52921a63e77
parent 1 431977d7c9a6
child 12 48ddaa42b810
equal deleted inserted replaced
1:431977d7c9a6 2:b52921a63e77
     1 import React from 'react';
     1 import React from 'react';
     2 
     2 
     3 import PropTypes from 'prop-types';
     3 import PropTypes from 'prop-types';
     4 import Immutable from 'immutable';
     4 import Immutable from 'immutable';
     5 
     5 
       
     6 import { ListGroup, ListGroupItem} from 'react-bootstrap';
       
     7 
     6 import Note from './Note';
     8 import Note from './Note';
     7 
     9 
     8 const NotesList = ({notes}) => {
    10 const NotesList = ({notes}) => {
     9   return (
    11   return (
    10     <div>
    12     <ListGroup>
    11       {notes.map((note) => 
    13       {notes.map((note) => 
    12         <Note key={note.id} note={note} />  
    14         <ListGroupItem key={note.id}><Note note={note} /></ListGroupItem>
    13       )}
    15       )}
    14     </div>
    16     </ListGroup>
    15   );
    17   );
    16 };
    18 };
    17 
    19 
    18 NotesList.propTypes = {
    20 NotesList.propTypes = {
    19   notes: PropTypes.instanceOf(Immutable.List).isRequired
    21   notes: PropTypes.instanceOf(Immutable.List).isRequired