PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.2.1
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.2.1
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / src / campaign-builder / components / UnsavedChangesModal.js

UnsavedChangesModal.js in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.2.1, at src/campaign-builder/components/UnsavedChangesModal.js

35 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 export default function UnsavedChangesModal( { onSaveAndExit, onCancel } ) {
4 return (
5 <div className="bp-unsaved-overlay" onClick={ onCancel }>
6 <div className="bp-unsaved-modal" onClick={ ( e ) => e.stopPropagation() }>
7
8 <div className="bp-unsaved-modal__icon">
9 <svg width="28" height="28" viewBox="0 0 24 24" fill="none">
10 <path d="M12 9v4M12 17h.01" stroke="#1a1a2e" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
11 </svg>
12 </div>
13
14 <h3 className="bp-unsaved-modal__title">
15 { __( 'You have unsaved changes', 'better-payment' ) }
16 </h3>
17
18 <p className="bp-unsaved-modal__body">
19 { __( 'Your campaign has unsaved changes. Save your changes before leaving, or cancel to continue editing.', 'better-payment' ) }
20 </p>
21
22 <div className="bp-unsaved-modal__actions">
23 <button className="bp-unsaved-modal__btn bp-unsaved-modal__btn--stay" onClick={ onSaveAndExit }>
24 { __( 'Save & Exit', 'better-payment' ) }
25 </button>
26 <button className="bp-unsaved-modal__btn bp-unsaved-modal__btn--leave" onClick={ onCancel }>
27 { __( 'Cancel', 'better-payment' ) }
28 </button>
29 </div>
30
31 </div>
32 </div>
33 );
34 }
35