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:
parent
f695b92c1f
commit
44f04c1cd1
|
@ -50,6 +50,7 @@ export interface FeaturedItemRequiredAttributes {
|
||||||
overlayGradient: string;
|
overlayGradient: string;
|
||||||
showDesc: boolean;
|
showDesc: boolean;
|
||||||
showPrice: boolean;
|
showPrice: boolean;
|
||||||
|
borderColor: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FeaturedCategoryRequiredAttributes
|
interface FeaturedCategoryRequiredAttributes
|
||||||
|
@ -171,6 +172,7 @@ export const withFeaturedItem =
|
||||||
showPrice,
|
showPrice,
|
||||||
style,
|
style,
|
||||||
textColor,
|
textColor,
|
||||||
|
borderColor,
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
const classes = classnames(
|
const classes = classnames(
|
||||||
|
@ -194,6 +196,11 @@ export const withFeaturedItem =
|
||||||
color: textColor
|
color: textColor
|
||||||
? `var(--wp--preset--color--${ textColor })`
|
? `var(--wp--preset--color--${ textColor })`
|
||||||
: style?.color?.text,
|
: style?.color?.text,
|
||||||
|
borderColor: borderColor
|
||||||
|
? `var(--wp--preset--color--${ borderColor })`
|
||||||
|
: 'transparent',
|
||||||
|
borderWidth: style?.border?.width,
|
||||||
|
boxSizing: 'border-box',
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapperStyle = {
|
const wrapperStyle = {
|
||||||
|
|
Loading…
Reference in New Issue