Add border attributes to featured items block to show border styles in editor (https://github.com/woocommerce/woocommerce-blocks/pull/8304)

This commit is contained in:
Roy Ho 2023-01-27 12:29:39 -08:00 committed by GitHub
parent f695b92c1f
commit 44f04c1cd1
1 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,7 @@ export interface FeaturedItemRequiredAttributes {
overlayGradient: string;
showDesc: boolean;
showPrice: boolean;
borderColor: string;
}
interface FeaturedCategoryRequiredAttributes
@ -171,6 +172,7 @@ export const withFeaturedItem =
showPrice,
style,
textColor,
borderColor,
} = attributes;
const classes = classnames(
@ -194,6 +196,11 @@ export const withFeaturedItem =
color: textColor
? `var(--wp--preset--color--${ textColor })`
: style?.color?.text,
borderColor: borderColor
? `var(--wp--preset--color--${ borderColor })`
: 'transparent',
borderWidth: style?.border?.width,
boxSizing: 'border-box',
};
const wrapperStyle = {