PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / src / Promotions / WelcomeBanner / resources / js / app / app.tsx

app.tsx in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at src/Promotions/WelcomeBanner/resources/js/app/app.tsx

41 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {__} from '@wordpress/i18n';
2 import Badge from './components/Badge';
3 import './styles.scss';
4 import {useDismiss} from './hooks/useDismiss';
5 import getWindowData from '../index';
6 import LeftContentSection from './components/Sections/LeftContentSection';
7 import RightContentSection from './components/Sections/RightContentSection';
8
9 /**
10 * @since 3.0.0
11 */
12 export default function App() {
13 const {showBanner, dismissBanner} = useDismiss();
14 const {assets} = getWindowData();
15
16 if (!showBanner) {
17 return;
18 }
19
20 return (
21 <div className={'givewp-welcome-banner'}>
22 <div className={'givewp-welcome-banner__dismiss-container'}>
23 <Badge
24 variant={'primary'}
25 caption={__('UPDATED', 'give')}
26 iconSrc={`${assets}/green-circle-check-icon.svg`}
27 alt={'check-mark'}
28 />
29 <button onClick={dismissBanner}>
30 <img src={`${assets}/close-icon.svg`} alt={'dismiss'} />
31 </button>
32 </div>
33
34 <div className={'givewp-welcome-banner__content-container'}>
35 <LeftContentSection assets={assets} />
36 <RightContentSection assets={assets} />
37 </div>
38 </div>
39 );
40 }
41