mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-01 23:41:04 -05:00
33 lines
874 B
TypeScript
33 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)
|