preview-logs-pane.js 513 B

1234567891011121314151617181920212223
  1. import React from 'react'
  2. import PropTypes from 'prop-types'
  3. import PreviewLogEntry from './preview-log-entry'
  4. function PreviewLogsPane({ logEntries }) {
  5. return (
  6. <div className="pdf-logs">
  7. {logEntries && logEntries.length > 0 ? (
  8. logEntries.map((logEntry, idx) => (
  9. <PreviewLogEntry key={idx} {...logEntry} />
  10. ))
  11. ) : (
  12. <div>No logs</div>
  13. )}
  14. </div>
  15. )
  16. }
  17. PreviewLogsPane.propTypes = {
  18. logEntries: PropTypes.array
  19. }
  20. export default PreviewLogsPane