PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.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 All 257 releases
give / blocks / components / blank-slate / index.js

index.js in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at blocks/components/blank-slate/index.js

45 lines 962 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { __ } from '@wordpress/i18n'
5
6 /**
7 * Internal dependencies
8 */
9 import GiveHelpLink from '../help-link';
10 import PlaceholderAnimation from '../placeholder-animation';
11 import GiveIcon from '@givewp/components/GiveIcon';
12
13 const GiveBlankSlate = ( props ) => {
14 const {
15 noIcon,
16 isLoader,
17 title,
18 description,
19 children,
20 helpLink,
21 } = props;
22
23 const blockLoading = (
24 <PlaceholderAnimation />
25 );
26
27 const blockLoaded = (
28 <div className="block-loaded">
29 { !! title && ( <h3 className="give-blank-slate__heading">{ title }</h3> ) }
30 { !! description && ( <p className="give-blank-slate__message">{ description }</p> ) }
31 { children }
32 { !! helpLink && ( <GiveHelpLink /> ) }
33 </div>
34 );
35
36 return (
37 <div className="give-blank-slate">
38 { ! noIcon && <GiveIcon size="80" className="give-blank-slate__image" /> }
39 { !! isLoader ? blockLoading : blockLoaded }
40 </div>
41 );
42 };
43
44 export default GiveBlankSlate;
45