diff --git a/packages/block-library/src/cover/block.json b/packages/block-library/src/cover/block.json index f908f544fb2974..75c2fd30fecd22 100644 --- a/packages/block-library/src/cover/block.json +++ b/packages/block-library/src/cover/block.json @@ -87,8 +87,21 @@ "padding": true } }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, "color": { - "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", + "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background, > .block-library-cover__border-wrapper > .wp-block-cover__video-background, > .block-library-cover__border-wrapper > .wp-block-cover__image-background", "text": false, "background": false } diff --git a/packages/block-library/src/cover/edit/index.js b/packages/block-library/src/cover/edit/index.js index 513e222294dbd9..3c57833389f4ea 100644 --- a/packages/block-library/src/cover/edit/index.js +++ b/packages/block-library/src/cover/edit/index.js @@ -19,6 +19,7 @@ import { useSetting, useInnerBlocksProps, __experimentalUseGradient, + __experimentalUseBorderProps as useBorderProps, store as blockEditorStore, } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; @@ -97,6 +98,8 @@ function CoverEdit( { templateLock, } = attributes; + const borderProps = useBorderProps( attributes ); + const [ featuredImage ] = useEntityProp( 'postType', postType, @@ -326,53 +329,61 @@ function CoverEdit( { showHandle={ isSelected } /> -