2020-05-27 14:45:18 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2020-06-05 19:13:51 +00:00
|
|
|
import { registerExperimentalBlockType } from '@woocommerce/block-settings';
|
2020-05-27 14:45:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import edit from './edit';
|
|
|
|
import save from './save';
|
|
|
|
import attributes from './attributes';
|
|
|
|
import {
|
|
|
|
BLOCK_NAME,
|
|
|
|
BLOCK_TITLE,
|
|
|
|
BLOCK_ICON,
|
|
|
|
BLOCK_DESCRIPTION,
|
|
|
|
} from './constants';
|
|
|
|
|
|
|
|
const settings = {
|
|
|
|
title: BLOCK_TITLE,
|
|
|
|
icon: {
|
|
|
|
src: BLOCK_ICON,
|
|
|
|
foreground: '#96588a',
|
|
|
|
},
|
|
|
|
category: 'woocommerce',
|
|
|
|
keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
|
|
|
|
description: BLOCK_DESCRIPTION,
|
|
|
|
supports: {
|
|
|
|
align: [ 'wide', 'full' ],
|
|
|
|
html: false,
|
|
|
|
},
|
|
|
|
example: {
|
|
|
|
attributes: {
|
|
|
|
isPreview: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
attributes,
|
|
|
|
edit,
|
|
|
|
save,
|
|
|
|
};
|
|
|
|
|
2020-06-05 19:13:51 +00:00
|
|
|
registerExperimentalBlockType( BLOCK_NAME, settings );
|