overleaf/services/web/frontend/js/features/review-panel-new/components/review-panel-delete-comment-modal.tsx
ilkin-overleaf 8bc374c916 Merge pull request #21115 from overleaf/ii-bs5-review-panel
[web] BS5 review panel new

GitOrigin-RevId: c65d17d0053858bd74984ba746a620b89d900606
2024-10-21 08:04:37 +00:00

37 lines
970 B
TypeScript

import { FC, memo } from 'react'
import OLButton from '@/features/ui/components/ol/ol-button'
import { useTranslation } from 'react-i18next'
import OLModal, {
OLModalBody,
OLModalFooter,
OLModalHeader,
OLModalTitle,
} from '@/features/ui/components/ol/ol-modal'
const ReviewPanelDeleteCommentModal: FC<{
onHide: () => void
onDelete: () => void
title: string
message: string
}> = ({ onHide, onDelete, title, message }) => {
const { t } = useTranslation()
return (
<OLModal show onHide={onHide}>
<OLModalHeader>
<OLModalTitle>{title}</OLModalTitle>
</OLModalHeader>
<OLModalBody>{message}</OLModalBody>
<OLModalFooter>
<OLButton variant="secondary" onClick={onHide}>
{t('cancel')}
</OLButton>
<OLButton variant="danger" onClick={onDelete}>
{t('delete')}
</OLButton>
</OLModalFooter>
</OLModal>
)
}
export default memo(ReviewPanelDeleteCommentModal)