preview-logs-pane-max-entries.js 963 B

123456789101112131415161718192021222324252627282930313233
  1. import PropTypes from 'prop-types'
  2. import { Trans, useTranslation } from 'react-i18next'
  3. import PreviewLogEntryHeader from './preview-log-entry-header'
  4. import Icon from '../../../shared/components/icon'
  5. function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown }) {
  6. const { t } = useTranslation()
  7. const title = t('log_entry_maximum_entries_title', {
  8. total: totalEntries,
  9. displayed: entriesShown,
  10. })
  11. return (
  12. <div className="log-entry" aria-label={t('log_entry_maximum_entries')}>
  13. <PreviewLogEntryHeader level="raw" headerTitle={title} />
  14. <div className="log-entry-content">
  15. <Icon type="lightbulb-o" />{' '}
  16. <Trans
  17. i18nKey="log_entry_maximum_entries_message"
  18. components={[<b key="bold-1" />]}
  19. />
  20. </div>
  21. </div>
  22. )
  23. }
  24. PreviewLogsPaneMaxEntries.propTypes = {
  25. totalEntries: PropTypes.number,
  26. entriesShown: PropTypes.number,
  27. }
  28. export default PreviewLogsPaneMaxEntries