components
4 years ago
css
4 years ago
block.json
4 years ago
edit.js
4 years ago
editor.scss
4 years ago
index.js
4 years ago
save.js
4 years ago
transforms.js
4 years ago
index.js
31 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import { registerBlockType } from '@wordpress/blocks'; |
| 5 | |
| 6 | /** |
| 7 | * Internal dependencies |
| 8 | */ |
| 9 | import metadata from './block.json'; |
| 10 | import edit from './edit'; |
| 11 | import save from './save'; |
| 12 | import transforms from './transforms'; |
| 13 | import dynamicContentAttributes from '../../extend/dynamic-content/attributes'; |
| 14 | import getSpacingAttributes from '../../components/dimensions/attributes'; |
| 15 | import getIcon from '../../utils/get-icon'; |
| 16 | |
| 17 | const attributes = Object.assign( |
| 18 | {}, |
| 19 | metadata.attributes, |
| 20 | dynamicContentAttributes, |
| 21 | getSpacingAttributes( 'image' ) |
| 22 | ); |
| 23 | |
| 24 | registerBlockType( 'generateblocks/image', { |
| 25 | icon: getIcon( 'image' ), |
| 26 | attributes, |
| 27 | edit, |
| 28 | save, |
| 29 | transforms, |
| 30 | } ); |
| 31 |