wp_back/wp-content/plugins/visual-portfolio/gutenberg/block/index.js
2024-05-20 15:37:46 +03:00

33 lines
678 B
JavaScript

import './style.scss';
import { registerBlockType } from '@wordpress/blocks';
import { ReactComponent as ElementIcon } from '../../assets/admin/images/icon-gutenberg.svg';
import metadata from './block.json';
import deprecated from './deprecated';
import edit from './edit';
import save from './save';
import transforms from './transforms';
import variations from './variations';
const { name } = metadata;
const settings = {
icon: {
foreground: '#2540CC',
src: <ElementIcon width="20" height="20" />,
},
example: {
attributes: {
preview_image_example: 'true',
},
},
variations,
edit,
save,
transforms,
deprecated,
};
registerBlockType(name, settings);