Fix border styles not visible in the editor in Featured Product and Featured Category blocks in core (https://github.com/woocommerce/woocommerce-blocks/pull/8838)

This commit is contained in:
Albert Juhé Lluveras 2023-03-23 15:36:46 +01:00 committed by GitHub
parent bf73555ee3
commit c9a6391e20
2 changed files with 0 additions and 16 deletions

View File

@ -3,7 +3,6 @@
* External dependencies
*/
import { __experimentalUseBorderProps } from '@wordpress/block-editor';
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { isObject } from '@woocommerce/types';
import { parseStyle } from '@woocommerce/base-utils';
@ -20,13 +19,6 @@ type WithStyle = {
export const useBorderProps = (
attributes: unknown
): WithStyle & WithClass => {
if ( ! isFeaturePluginBuild() ) {
return {
className: '',
style: {},
};
}
const attributesObject = isObject( attributes ) ? attributes : {};
const style = parseStyle( attributesObject.style );

View File

@ -3,7 +3,6 @@
* External dependencies
*/
import { __experimentalUseColorProps } from '@wordpress/block-editor';
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { isObject } from '@woocommerce/types';
import { parseStyle } from '@woocommerce/base-utils';
@ -18,13 +17,6 @@ type WithStyle = {
// @todo The @wordpress/block-editor dependency should never be used on the frontend of the store due to excessive side and its dependency on @wordpress/components
// @see https://github.com/woocommerce/woocommerce-blocks/issues/8071
export const useColorProps = ( attributes: unknown ): WithStyle & WithClass => {
if ( ! isFeaturePluginBuild() ) {
return {
className: '',
style: {},
};
}
const attributesObject = isObject( attributes ) ? attributes : {};
const style = parseStyle( attributesObject.style );