Blame view

imports/ui/components/DocumentsList.js 508 Bytes
d1f05315d   tmcdeveloper   wip adding API an...
1
  import React from 'react';
c42d4eeac   themeteorchef   handful of changes
2
  import { ListGroup, ListGroupItem, Alert } from 'react-bootstrap';
d1f05315d   tmcdeveloper   wip adding API an...
3

3540345c5   themeteorchef   handful of fixes
4
  const DocumentsList = ({ documents }) => (
c42d4eeac   themeteorchef   handful of changes
5
6
7
    documents.length > 0 ? <ListGroup className="DocumentsList">
      {documents.map(({ _id, title }) => (
        <ListGroupItem key={ _id } href={`/documents/${_id}`}>{ title }</ListGroupItem>
f0c912bf1   tmcdeveloper   add method tests ...
8
9
10
11
      ))}
    </ListGroup> :
    <Alert bsStyle="warning">No documents yet.</Alert>
  );
76dd62c7b   tmcdeveloper   fix eslint error ...
12
13
14
15
  
  DocumentsList.propTypes = {
    documents: React.PropTypes.array,
  };
3540345c5   themeteorchef   handful of fixes
16
17
  
  export default DocumentsList;