Merge branch 'trunk' of github.com:woocommerce/woocommerce-blocks into trunk

This commit is contained in:
Niels Lange 2023-02-01 16:34:00 +01:00
commit b368835638
2 changed files with 22 additions and 13 deletions

View File

@ -23,23 +23,12 @@
"align": [ "wide", "full" ],
"color": {
"background": false,
"link": true,
"__experimentalDefaultControls": {
"text": true,
"link": true
}
"link": true
},
"html": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalTextTransform": true,
"__experimentalDefaultControls": {
"fontSize": true
}
"lineHeight": true
}
},
"apiVersion": 2,

View File

@ -2,6 +2,7 @@
* External dependencies
*/
import { registerBlockType } from '@wordpress/blocks';
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { Icon, queryPagination } from '@wordpress/icons';
/**
@ -10,6 +11,22 @@ import { Icon, queryPagination } from '@wordpress/icons';
import metadata from './block.json';
import edit from './edit';
const featurePluginSupport = {
...metadata.supports,
...( isFeaturePluginBuild() && {
typography: {
...metadata.supports.typography,
__experimentalFontFamily: true,
__experimentalFontStyle: true,
__experimentalFontWeight: true,
__experimentalTextTransform: true,
__experimentalDefaultControls: {
fontSize: true,
},
},
} ),
};
registerBlockType( metadata, {
icon: {
src: (
@ -22,6 +39,9 @@ registerBlockType( metadata, {
attributes: {
...metadata.attributes,
},
supports: {
...featurePluginSupport,
},
edit,
save() {
return null;