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-08-18 18:03:53 +00:00
|
|
|
import { Icon } from '@wordpress/icons';
|
2023-01-27 17:31:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import metadata from './block.json';
|
|
|
|
import edit from './edit';
|
2023-08-18 18:03:53 +00:00
|
|
|
import { queryPaginationIcon } from './icon';
|
2023-07-04 11:06:48 +00:00
|
|
|
import './style.scss';
|
2023-01-27 17:31:13 +00:00
|
|
|
|
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
|
2023-08-18 18:03:53 +00:00
|
|
|
icon={ queryPaginationIcon }
|
2023-01-27 17:31:13 +00:00
|
|
|
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;
|
|
|
|
},
|
|
|
|
} );
|