Skip to content

Commit 7bb1c9d

Browse files
authored
fix(ui): bulk upload DiscardWithoutSaving modal styles (#11381)
This PR fixes an issue where the `DiscardWithoutSaving` modal in the bulk upload process was missing its styles. The modal now displays correctly with the intended styling. ### Before: ![Screenshot 2025-02-24 at 8 20 52 PM](https://github.com/user-attachments/assets/c83a3119-28ce-4701-bc64-1219adeb2505) ### After: ![Screenshot 2025-02-24 at 8 20 07 PM](https://github.com/user-attachments/assets/62d364c2-b64c-4bd9-bf05-7481d609c6e4) Fixes #11380
1 parent 4410a49 commit 7bb1c9d

File tree

1 file changed

+10
-20
lines changed
  • packages/ui/src/elements/BulkUpload/DiscardWithoutSaving

1 file changed

+10
-20
lines changed

packages/ui/src/elements/BulkUpload/DiscardWithoutSaving/index.tsx

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ import { useModal } from '@faceless-ui/modal'
44
import React from 'react'
55

66
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'
98
import { useBulkUpload } from '../index.js'
10-
119
export const discardBulkUploadModalSlug = 'bulk-upload--discard-without-saving'
12-
const baseClass = 'leave-without-saving'
1310

1411
export function DiscardWithoutSaving() {
1512
const { t } = useTranslation()
@@ -26,21 +23,14 @@ export function DiscardWithoutSaving() {
2623
}, [closeModal, drawerSlug])
2724

2825
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+
/>
4535
)
4636
}

0 commit comments

Comments
 (0)