history-toggle-button.jsx 683 B

1234567891011121314151617181920212223
  1. import PropTypes from 'prop-types'
  2. import { useTranslation } from 'react-i18next'
  3. import MaterialIcon from '@/shared/components/material-icon'
  4. function HistoryToggleButton({ onClick }) {
  5. const { t } = useTranslation()
  6. return (
  7. <div className="toolbar-item">
  8. <button type="button" className="btn btn-full-height" onClick={onClick}>
  9. <MaterialIcon type="history" className="align-middle" />
  10. <p className="toolbar-label">{t('history')}</p>
  11. </button>
  12. <div id="toolbar-cio-history" className="toolbar-cio-tooltip" />
  13. </div>
  14. )
  15. }
  16. HistoryToggleButton.propTypes = {
  17. onClick: PropTypes.func.isRequired,
  18. }
  19. export default HistoryToggleButton