overleaf/services/web/frontend/js/features/review-panel-new/components/review-panel-more-comments-button.tsx
David a331ac6116 Merge pull request #19796 from overleaf/dp-more-comments-2
Add More Comments buttons

GitOrigin-RevId: 3cd6539683cbc53ceb63488ab9e9b0ffe53e079c
2024-10-14 10:59:29 +00:00

32 lines
874 B
TypeScript

import { FC, memo } from 'react'
import { Button } from 'react-bootstrap'
import MaterialIcon from '@/shared/components/material-icon'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
const MoreCommentsButton: FC<{
onClick: () => void
direction: 'upward' | 'downward'
}> = ({ onClick, direction }) => {
const { t } = useTranslation()
return (
<div
className={classNames('review-panel-more-comments-button-container', {
downwards: direction === 'downward',
upwards: direction === 'upward',
})}
>
<Button
bsSize="small"
className="btn-secondary review-panel-more-comments-button"
onClick={onClick}
>
<MaterialIcon type={`arrow_${direction}_alt`} />
{t('more_comments')}
</Button>
</div>
)
}
export default memo(MoreCommentsButton)