| @@ -1,38 +1,38 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * WordPress dependencies |
| 3 | 3 | */ |
| 4 | -const { __ } = wp.i18n; | |
| 5 | -const { registerBlockType } = wp.blocks; | |
| 4 | +import {__} from '@wordpress/i18n'; | |
| 5 | +import {registerBlockType} from '@wordpress/blocks'; | |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Internal dependencies |
| 9 | 9 | */ |
| 10 | -import './style.scss'; | |
| 11 | -import GiveLogo from '../components/logo'; | |
| 10 | +import GiveIcon from '@givewp/components/GiveIcon'; | |
| 12 | 11 | import blockAttributes from './data/attributes'; |
| 13 | -import GiveForm from './edit/block'; | |
| 12 | +import Edit from '@givewp/src/DonationForms/Blocks/DonationFormBlock/resources/editor/Edit'; | |
| 14 | 13 | |
| 15 | 14 | /** |
| 16 | 15 | * Register Block |
| 17 | -*/ | |
| 16 | + */ | |
| 18 | 17 | |
| 19 | -export default registerBlockType( 'give/donation-form', { | |
| 18 | +export default registerBlockType('give/donation-form', { | |
| 19 | + apiVersion: 3, | |
| 20 | + title: __('Donation Form', 'give'), | |
| 21 | + description: __( | |
| 22 | + "The GiveWP Donation Form block inserts an existing donation form into the page. Each donation form's presentation can be customized below.", | |
| 23 | + 'give' | |
| 24 | + ), | |
| 25 | + category: 'give', | |
| 26 | + icon: <GiveIcon color="grey" />, | |
| 27 | + keywords: [__('donation', 'give')], | |
| 28 | + supports: { | |
| 29 | + html: false, | |
| 30 | + }, | |
| 31 | + attributes: blockAttributes, | |
| 32 | + edit: Edit, | |
| 20 | 33 | |
| 21 | - title: __( 'Give Form' ), | |
| 22 | - description: __( 'The Give Donation Form block insert an existing donation form into the page. Each form\'s presentation can be customized below.' ), | |
| 23 | - category: 'give', | |
| 24 | - icon: <GiveLogo color="grey" />, | |
| 25 | - keywords: [ | |
| 26 | - __( 'donation' ), | |
| 27 | - ], | |
| 28 | - supports: { | |
| 29 | - html: false, | |
| 30 | - }, | |
| 31 | - attributes: blockAttributes, | |
| 32 | - edit: GiveForm, | |
| 33 | - | |
| 34 | - save: () => { | |
| 35 | - // Server side rendering via shortcode | |
| 36 | - return null; | |
| 37 | - }, | |
| 38 | -} ); | |
| 34 | + save: () => { | |
| 35 | + // Server side rendering via shortcode | |
| 36 | + return null; | |
| 37 | + }, | |
| 38 | +}); | |