index.js
37 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import { __ } from '@wordpress/i18n' |
| 5 | const {registerBlockType} = wp.blocks; |
| 6 | |
| 7 | /** |
| 8 | * Internal dependencies |
| 9 | */ |
| 10 | import blockAttributes from './data/attributes'; |
| 11 | import GiveIcon from '@givewp/components/GiveIcon'; |
| 12 | import edit from './edit'; |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | */ |
| 17 | |
| 18 | export default registerBlockType('give/donor-dashboard', { |
| 19 | title: __('Donor Dashboard', 'give'), |
| 20 | description: __( |
| 21 | 'The Donor Dashboard block allows donors to modify and review their donor information from the front-end.', |
| 22 | 'give' |
| 23 | ), |
| 24 | category: 'give', |
| 25 | icon: <GiveIcon color="grey" />, |
| 26 | keywords: [__('donor', 'give'), __('dashboard', 'give')], |
| 27 | attributes: blockAttributes, |
| 28 | supports: { |
| 29 | align: ['wide'], |
| 30 | }, |
| 31 | edit: edit, |
| 32 | save: () => { |
| 33 | // Server side rendering via shortcode |
| 34 | return null; |
| 35 | }, |
| 36 | }); |
| 37 |