review-panel-more-comments-button.tsx 817 B

12345678910111213141516171819202122232425262728
  1. import { FC, memo } from 'react'
  2. import MaterialIcon from '@/shared/components/material-icon'
  3. import classNames from 'classnames'
  4. import { useTranslation } from 'react-i18next'
  5. import OLButton from '@/shared/components/ol/ol-button'
  6. const MoreCommentsButton: FC<{
  7. onClick: () => void
  8. direction: 'upward' | 'downward'
  9. }> = ({ onClick, direction }) => {
  10. const { t } = useTranslation()
  11. return (
  12. <div
  13. className={classNames('review-panel-more-comments-button-container', {
  14. downwards: direction === 'downward',
  15. upwards: direction === 'upward',
  16. })}
  17. >
  18. <OLButton variant="secondary" size="sm" onClick={onClick}>
  19. <MaterialIcon type={`arrow_${direction}_alt`} />
  20. {t('more_comments')}
  21. </OLButton>
  22. </div>
  23. )
  24. }
  25. export default memo(MoreCommentsButton)