Blame view

imports/ui/components/documents-list.js 467 Bytes
d1f05315d   tmcdeveloper   wip adding API an...
1
  import React from 'react';
76dd62c7b   tmcdeveloper   fix eslint error ...
2
  import { ListGroup, Alert } from 'react-bootstrap';
f0c912bf1   tmcdeveloper   add method tests ...
3
  import { Document } from './document.js';
d1f05315d   tmcdeveloper   wip adding API an...
4

f0c912bf1   tmcdeveloper   add method tests ...
5
6
7
8
9
10
11
12
  export const DocumentsList = ({ documents }) => (
    documents.length > 0 ? <ListGroup className="documents-list">
      {documents.map((doc) => (
        <Document key={ doc._id } document={ doc } />
      ))}
    </ListGroup> :
    <Alert bsStyle="warning">No documents yet.</Alert>
  );
76dd62c7b   tmcdeveloper   fix eslint error ...
13
14
15
16
  
  DocumentsList.propTypes = {
    documents: React.PropTypes.array,
  };