@@ -4,12 +4,9 @@ import { useModal } from '@faceless-ui/modal'
4
4
import React from 'react'
5
5
6
6
import { useTranslation } from '../../../providers/Translation/index.js'
7
- import { Button } from '../../Button/index.js'
8
- import { FullscreenModal } from '../../FullscreenModal/index.js'
7
+ import { ConfirmationModal } from '../../ConfirmationModal/index.js'
9
8
import { useBulkUpload } from '../index.js'
10
-
11
9
export const discardBulkUploadModalSlug = 'bulk-upload--discard-without-saving'
12
- const baseClass = 'leave-without-saving'
13
10
14
11
export function DiscardWithoutSaving ( ) {
15
12
const { t } = useTranslation ( )
@@ -26,21 +23,14 @@ export function DiscardWithoutSaving() {
26
23
} , [ closeModal , drawerSlug ] )
27
24
28
25
return (
29
- < FullscreenModal className = { baseClass } slug = { discardBulkUploadModalSlug } >
30
- < div className = { `${ baseClass } __wrapper` } >
31
- < div className = { `${ baseClass } __content` } >
32
- < h1 > { t ( 'general:leaveWithoutSaving' ) } </ h1 >
33
- < p > { t ( 'general:changesNotSaved' ) } </ p >
34
- </ div >
35
- < div className = { `${ baseClass } __controls` } >
36
- < Button buttonStyle = "secondary" onClick = { onCancel } size = "large" >
37
- { t ( 'general:stayOnThisPage' ) }
38
- </ Button >
39
- < Button onClick = { onConfirm } size = "large" >
40
- { t ( 'general:leaveAnyway' ) }
41
- </ Button >
42
- </ div >
43
- </ div >
44
- </ FullscreenModal >
26
+ < ConfirmationModal
27
+ body = { t ( 'general:changesNotSaved' ) }
28
+ cancelLabel = { t ( 'general:stayOnThisPage' ) }
29
+ confirmLabel = { t ( 'general:leaveAnyway' ) }
30
+ heading = { t ( 'general:leaveWithoutSaving' ) }
31
+ modalSlug = { discardBulkUploadModalSlug }
32
+ onCancel = { onCancel }
33
+ onConfirm = { onConfirm }
34
+ />
45
35
)
46
36
}
0 commit comments