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:  ### After:  Fixes #11380
This commit is contained in:
@@ -4,12 +4,9 @@ import { useModal } from '@faceless-ui/modal'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import { useTranslation } from '../../../providers/Translation/index.js'
|
import { useTranslation } from '../../../providers/Translation/index.js'
|
||||||
import { Button } from '../../Button/index.js'
|
import { ConfirmationModal } from '../../ConfirmationModal/index.js'
|
||||||
import { FullscreenModal } from '../../FullscreenModal/index.js'
|
|
||||||
import { useBulkUpload } from '../index.js'
|
import { useBulkUpload } from '../index.js'
|
||||||
|
|
||||||
export const discardBulkUploadModalSlug = 'bulk-upload--discard-without-saving'
|
export const discardBulkUploadModalSlug = 'bulk-upload--discard-without-saving'
|
||||||
const baseClass = 'leave-without-saving'
|
|
||||||
|
|
||||||
export function DiscardWithoutSaving() {
|
export function DiscardWithoutSaving() {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@@ -26,21 +23,14 @@ export function DiscardWithoutSaving() {
|
|||||||
}, [closeModal, drawerSlug])
|
}, [closeModal, drawerSlug])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FullscreenModal className={baseClass} slug={discardBulkUploadModalSlug}>
|
<ConfirmationModal
|
||||||
<div className={`${baseClass}__wrapper`}>
|
body={t('general:changesNotSaved')}
|
||||||
<div className={`${baseClass}__content`}>
|
cancelLabel={t('general:stayOnThisPage')}
|
||||||
<h1>{t('general:leaveWithoutSaving')}</h1>
|
confirmLabel={t('general:leaveAnyway')}
|
||||||
<p>{t('general:changesNotSaved')}</p>
|
heading={t('general:leaveWithoutSaving')}
|
||||||
</div>
|
modalSlug={discardBulkUploadModalSlug}
|
||||||
<div className={`${baseClass}__controls`}>
|
onCancel={onCancel}
|
||||||
<Button buttonStyle="secondary" onClick={onCancel} size="large">
|
onConfirm={onConfirm}
|
||||||
{t('general:stayOnThisPage')}
|
/>
|
||||||
</Button>
|
|
||||||
<Button onClick={onConfirm} size="large">
|
|
||||||
{t('general:leaveAnyway')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</FullscreenModal>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user