| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * WordPress dependencies |
| 3 | 3 | */ |
| 4 | -const { __ } = wp.i18n; | |
| 4 | +import { __ } from '@wordpress/i18n' | |
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | 7 | * Internal dependencies |
| 8 | 8 | */ |
| @@ -7,9 +7,9 @@ | ||
| 7 | 7 | * Internal dependencies |
| 8 | 8 | */ |
| 9 | 9 | import GiveHelpLink from '../help-link'; |
| 10 | 10 | import PlaceholderAnimation from '../placeholder-animation'; |
| 11 | -import './style.scss'; | |
| 11 | +import GiveIcon from '@givewp/components/GiveIcon'; | |
| 12 | 12 | |
| 13 | 13 | const GiveBlankSlate = ( props ) => { |
| 14 | 14 | const { |
| 15 | 15 | noIcon, |
| @@ -19,11 +19,8 @@ | ||
| 19 | 19 | children, |
| 20 | 20 | helpLink, |
| 21 | 21 | } = props; |
| 22 | 22 | |
| 23 | - // @todo: do not hard code wp content url that can be configure. | |
| 24 | - const giveLogo = '/wp-content/plugins/Give/assets/dist/images/give-icon-full-circle.svg'; | |
| 25 | - | |
| 26 | 23 | const blockLoading = ( |
| 27 | 24 | <PlaceholderAnimation /> |
| 28 | 25 | ); |
| 29 | 26 | |
| @@ -28,9 +25,9 @@ | ||
| 28 | 25 | ); |
| 29 | 26 | |
| 30 | 27 | const blockLoaded = ( |
| 31 | 28 | <div className="block-loaded"> |
| 32 | - { !! title && ( <h2 className="give-blank-slate__heading">{ title }</h2> ) } | |
| 29 | + { !! title && ( <h3 className="give-blank-slate__heading">{ title }</h3> ) } | |
| 33 | 30 | { !! description && ( <p className="give-blank-slate__message">{ description }</p> ) } |
| 34 | 31 | { children } |
| 35 | 32 | { !! helpLink && ( <GiveHelpLink /> ) } |
| 36 | 33 | </div> |
| @@ -37,13 +34,9 @@ | ||
| 37 | 34 | ); |
| 38 | 35 | |
| 39 | 36 | return ( |
| 40 | 37 | <div className="give-blank-slate"> |
| 41 | - { ! noIcon && ( | |
| 42 | - <img className="give-blank-slate__image" | |
| 43 | - src={ `${ wpApiSettings.schema.url }${ giveLogo }` } | |
| 44 | - alt={ __( 'Give Icon' ) } /> | |
| 45 | - ) } | |
| 38 | + { ! noIcon && <GiveIcon size="80" className="give-blank-slate__image" /> } | |
| 46 | 39 | { !! isLoader ? blockLoading : blockLoaded } |
| 47 | 40 | </div> |
| 48 | 41 | ); |
| 49 | 42 | }; |