give
/
src
/
Campaigns
/
resources
/
admin
/
components
/
CampaignDetailsPage
/
Components
/
ArchiveCampaignDialog.tsx
give
/
src
/
Campaigns
/
resources
/
admin
/
components
/
CampaignDetailsPage
/
Components
Last commit date
CampaignDetailsErrorBoundary
1 year ago
CampaignStats
7 months ago
ColorControl
1 year ago
DefaultForm
1 year ago
GoalProgressChart
1 year ago
Notices
7 months ago
TextareaControl
1 year ago
ArchiveCampaignDialog.tsx
1 year ago
HeaderSubText.tsx
1 year ago
HeaderText.tsx
1 year ago
RevenueChart.tsx
1 year ago
ArchiveCampaignDialog.tsx
54 lines
| 1 | import {__} from '@wordpress/i18n' |
| 2 | import ModalDialog from '@givewp/components/AdminUI/ModalDialog'; |
| 3 | import {ErrorIcon} from '../../Icons'; |
| 4 | import styles from '../CampaignDetailsPage.module.scss' |
| 5 | |
| 6 | /** |
| 7 | * @since 4.0.0 |
| 8 | */ |
| 9 | export default ({ |
| 10 | isOpen, |
| 11 | title, |
| 12 | handleClose, |
| 13 | handleConfirm, |
| 14 | className, |
| 15 | }: { |
| 16 | isOpen: boolean; |
| 17 | handleClose: () => void; |
| 18 | handleConfirm: () => void; |
| 19 | title: string; |
| 20 | className?: string; |
| 21 | }) => { |
| 22 | return ( |
| 23 | <ModalDialog |
| 24 | icon={<ErrorIcon />} |
| 25 | isOpen={isOpen} |
| 26 | showHeader={true} |
| 27 | handleClose={handleClose} |
| 28 | title={title} |
| 29 | wrapperClassName={className} |
| 30 | > |
| 31 | <> |
| 32 | <div className={styles.archiveDialogContent}> |
| 33 | {__('Are you sure you want to archive your campaign? All forms associated with this campaign will be inaccessible to donors.', 'give')} |
| 34 | </div> |
| 35 | <div className={styles.archiveDialogButtons}> |
| 36 | <button |
| 37 | className={styles.cancelButton} |
| 38 | onClick={handleClose} |
| 39 | |
| 40 | > |
| 41 | {__('Cancel', 'give')} |
| 42 | </button> |
| 43 | <button |
| 44 | className={styles.confirmButton} |
| 45 | onClick={handleConfirm} |
| 46 | > |
| 47 | {__('Archive campaign', 'give')} |
| 48 | </button> |
| 49 | </div> |
| 50 | </> |
| 51 | </ModalDialog> |
| 52 | ); |
| 53 | } |
| 54 |