-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b86d456
commit 4e0a1a5
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/components/CardEditable/components/UnsavedChanges/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Modal } from 'antd'; | ||
import { useTranslation } from 'react-i18next'; | ||
import Title from 'antd/lib/typography/Title'; | ||
|
||
export interface UnsavedChangesProps { | ||
onConfirm: () => void; | ||
onClose: () => void; | ||
} | ||
|
||
export const UnsavedChangesModal = ({ onConfirm, onClose }: UnsavedChangesProps) => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<Modal | ||
title={<Title level={2}>{t('overlay.unsaved.title')}</Title>} | ||
open | ||
onOk={onConfirm} | ||
onCancel={onClose} | ||
cancelText={t('overlay.unsaved.cancel')} | ||
centered | ||
okText={t('overlay.unsaved.confirm')} | ||
> | ||
{t('overlay.unsaved.text')} | ||
</Modal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters