import { createElement } from '@wordpress/element' import { __ } from 'ct-i18n' import { registerBlockType } from '@wordpress/blocks' import { getAttributesFromOptions, getOptionsForBlock } from '../../utils' import Edit from './Edit' import { colorsDefaults } from './colors' export const options = getOptionsForBlock('share_box') export const defaultAttributes = getAttributesFromOptions(options) registerBlockType('blocksy/share-box', { apiVersion: 3, title: __('Share Box Controls', 'blocksy'), icon: { src: ( ), }, supports: { html: false, multiple: false, inserter: false, lock: false, }, parent: ['blocksy/widgets-wrapper'], attributes: { ...defaultAttributes, ...colorsDefaults, }, edit: (props) => , save: function () { return
Blocksy: Share Box
}, }) wp.blocks.registerBlockVariation('blocksy/widgets-wrapper', { name: 'blocksy-share-box', title: __('Share Box', 'blocksy'), attributes: { heading: __('Share Box', 'blocksy'), block: 'blocksy/share-box', }, isActive: (attributes) => attributes.block === 'blocksy/share-box', icon: { src: ( ), }, })