Skip to content

Commit

Permalink
Doc Build
Browse files Browse the repository at this point in the history
  • Loading branch information
benazeer-ben committed Nov 26, 2024
1 parent 38ca863 commit cc18957
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Add a block that displays content pulled from other sites, like Twitter or YouTu

- **Name:** core/embed
- **Category:** embed
- **Supports:** align, interactivity (clientNavigation), spacing (margin, padding)
- **Supports:** align, interactivity (clientNavigation), spacing (margin)
- **Attributes:** allowResponsive, caption, previewable, providerNameSlug, responsive, type, url

## File
Expand Down
8 changes: 3 additions & 5 deletions packages/block-library/src/embed/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,18 @@
"supports": {
"align": true,
"spacing": {
"margin": true,
"padding": true,
"__experimentalSkipSerialization": [ "padding" ]
"margin": true
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"radius": false,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"radius": false,
"color": true,
"width": true,
"style": true
Expand Down
7 changes: 2 additions & 5 deletions packages/block-library/src/embed/embed-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { Placeholder, SandBox } from '@wordpress/components';
import {
BlockIcon,
__experimentalUseBorderProps as useBorderProps,
__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
} from '@wordpress/block-editor';
import { useState } from '@wordpress/element';
import { getAuthority } from '@wordpress/url';
Expand Down Expand Up @@ -70,7 +69,6 @@ export default function EmbedPreview( {
'wp-block-embed__wrapper'
);
const borderProps = useBorderProps( attributes );
const spacingProps = getSpacingClassesAndStyles( attributes );

// Disabled because the overlay div doesn't actually have a role or functionality
// as far as the user is concerned. We're just catching the first click so that
Expand All @@ -83,10 +81,9 @@ export default function EmbedPreview( {
<div
className={ clsx(
'wp-block-embed__wrapper',
borderProps.className,
spacingProps.className
borderProps.className
) }
style={ { ...borderProps.style, ...spacingProps.style } }
style={ { ...borderProps.style } }
>
<SandBox
html={ html }
Expand Down
7 changes: 2 additions & 5 deletions packages/block-library/src/embed/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
useBlockProps,
__experimentalGetElementClassName,
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
} from '@wordpress/block-editor';

export default function save( { attributes } ) {
Expand All @@ -21,7 +20,6 @@ export default function save( { attributes } ) {
return null;
}
const borderProps = getBorderClassesAndStyles( attributes );
const spacingProps = getSpacingClassesAndStyles( attributes );

const className = clsx( 'wp-block-embed', {
[ `is-type-${ type }` ]: type,
Expand All @@ -34,10 +32,9 @@ export default function save( { attributes } ) {
<div
className={ clsx(
'wp-block-embed__wrapper',
borderProps.className,
spacingProps.className
borderProps.className
) }
style={ { ...borderProps.style, ...spacingProps.style } }
style={ { ...borderProps.style } }
>
{ `\n${ url }\n` /* URL needs to be on its own line. */ }
</div>
Expand Down

0 comments on commit cc18957

Please sign in to comment.