2023-01-27 17:31:13 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { registerBlockType } from '@wordpress/blocks';
|
2023-02-01 15:31:45 +00:00
|
|
|
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
|
2023-01-27 17:31:13 +00:00
|
|
|
import { Icon, queryPagination } from '@wordpress/icons';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import metadata from './block.json';
|
|
|
|
import edit from './edit';
|
|
|
|
|
2023-02-01 15:31:45 +00:00
|
|
|
const featurePluginSupport = {
|
|
|
|
...metadata.supports,
|
|
|
|
...( isFeaturePluginBuild() && {
|
|
|
|
typography: {
|
|
|
|
...metadata.supports.typography,
|
|
|
|
__experimentalFontFamily: true,
|
|
|
|
__experimentalFontStyle: true,
|
|
|
|
__experimentalFontWeight: true,
|
|
|
|
__experimentalTextTransform: true,
|
|
|
|
__experimentalDefaultControls: {
|
|
|
|
fontSize: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} ),
|
|
|
|
};
|
|
|
|
|
2023-01-27 17:31:13 +00:00
|
|
|
registerBlockType( metadata, {
|
|
|
|
icon: {
|
|
|
|
src: (
|
|
|
|
<Icon
|
|
|
|
icon={ queryPagination }
|
|
|
|
className="wc-block-editor-components-block-icon"
|
|
|
|
/>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
attributes: {
|
|
|
|
...metadata.attributes,
|
|
|
|
},
|
2023-02-01 15:31:45 +00:00
|
|
|
supports: {
|
|
|
|
...featurePluginSupport,
|
|
|
|
},
|
2023-01-27 17:31:13 +00:00
|
|
|
edit,
|
|
|
|
save() {
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
} );
|