woocommerce/plugins/woocommerce-blocks/assets/js/blocks/breadcrumbs/index.tsx

50 lines
897 B
TypeScript
Raw Normal View History

/**
* External dependencies
*/
import { registerBlockType } from '@wordpress/blocks';
import { Icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import metadata from './block.json';
import edit from './edit';
import { queryPaginationIcon } from './icon';
import './style.scss';
const featurePluginSupport = {
...metadata.supports,
typography: {
...metadata.supports.typography,
__experimentalFontFamily: true,
__experimentalFontStyle: true,
__experimentalFontWeight: true,
__experimentalTextTransform: true,
__experimentalDefaultControls: {
fontSize: true,
},
},
};
registerBlockType( metadata, {
icon: {
src: (
<Icon
icon={ queryPaginationIcon }
className="wc-block-editor-components-block-icon"
/>
),
},
attributes: {
...metadata.attributes,
},
supports: {
...featurePluginSupport,
},
edit,
save() {
return null;
},
} );