diff --git a/packages/block-library/src/audio/edit.js b/packages/block-library/src/audio/edit.js index df34522d7d3cb..c679f768b8d3d 100644 --- a/packages/block-library/src/audio/edit.js +++ b/packages/block-library/src/audio/edit.js @@ -14,6 +14,7 @@ import { import { Component, Fragment } from '@wordpress/element'; import { BlockControls, + BlockIcon, InspectorControls, MediaPlaceholder, RichText, @@ -21,6 +22,11 @@ import { } from '@wordpress/editor'; import { getBlobByURL } from '@wordpress/blob'; +/** + * Internal dependencies + */ +import { icon } from './index'; + class AudioEdit extends Component { constructor() { super( ...arguments ); @@ -100,7 +106,7 @@ class AudioEdit extends Component { if ( editing ) { return ( labels={ { title: __( 'Audio' ), name: __( 'an audio' ), diff --git a/packages/block-library/src/audio/index.js b/packages/block-library/src/audio/index.js index 6ae6944762391..b587b9e88a01e 100644 --- a/packages/block-library/src/audio/index.js +++ b/packages/block-library/src/audio/index.js @@ -95,3 +95,5 @@ export const settings = { ); }, }; + +export const icon = settings.icon; diff --git a/packages/block-library/src/audio/test/__snapshots__/index.js.snap b/packages/block-library/src/audio/test/__snapshots__/index.js.snap index 71c38018c590f..249d5aff0c2e9 100644 --- a/packages/block-library/src/audio/test/__snapshots__/index.js.snap +++ b/packages/block-library/src/audio/test/__snapshots__/index.js.snap @@ -7,20 +7,25 @@ exports[`core/audio block edit matches snapshot 1`] = `
- + +
Audio
; + export const settings = { title: __( 'Cover Image' ), description: __( 'Add a full-width image, and layer text over it — great for headers.' ), - icon: , + icon, category: 'common', @@ -194,7 +197,6 @@ export const settings = { if ( ! url ) { const hasTitle = ! isEmpty( title ); - const icon = hasTitle ? undefined : 'format-image'; const label = hasTitle ? ( { controls } } className={ className } labels={ { title: label, diff --git a/packages/block-library/src/cover-image/test/__snapshots__/index.js.snap b/packages/block-library/src/cover-image/test/__snapshots__/index.js.snap index f6690fdae6fe9..814827d3d66f4 100644 --- a/packages/block-library/src/cover-image/test/__snapshots__/index.js.snap +++ b/packages/block-library/src/cover-image/test/__snapshots__/index.js.snap @@ -7,20 +7,25 @@ exports[`core/cover-image block edit matches snapshot 1`] = `
- + +
Cover Image
labels={ { title: __( 'File' ), name: __( 'a file' ), diff --git a/packages/block-library/src/file/index.js b/packages/block-library/src/file/index.js index 6dee26f23b2c0..b17359135b03f 100644 --- a/packages/block-library/src/file/index.js +++ b/packages/block-library/src/file/index.js @@ -227,5 +227,6 @@ export const settings = {
); }, - }; + +export const icon = settings.icon; diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index 5190799474f11..854abbab70597 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -21,6 +21,7 @@ import { } from '@wordpress/components'; import { BlockControls, + BlockIcon, MediaUpload, MediaPlaceholder, InspectorControls, @@ -31,6 +32,7 @@ import { * Internal dependencies */ import GalleryImage from './gallery-image'; +import { icon } from './index'; const MAX_COLUMNS = 8; const linkOptions = [ @@ -191,7 +193,7 @@ class GalleryEdit extends Component { { controls } className={ className } labels={ { title: __( 'Gallery' ), diff --git a/packages/block-library/src/gallery/index.js b/packages/block-library/src/gallery/index.js index 835e85e2b32f4..824dd438b0d1a 100644 --- a/packages/block-library/src/gallery/index.js +++ b/packages/block-library/src/gallery/index.js @@ -270,3 +270,5 @@ export const settings = { }, ], }; + +export const icon = settings.icon; diff --git a/packages/block-library/src/gallery/test/__snapshots__/index.js.snap b/packages/block-library/src/gallery/test/__snapshots__/index.js.snap index fa8820564390d..ac54a7233f11e 100644 --- a/packages/block-library/src/gallery/test/__snapshots__/index.js.snap +++ b/packages/block-library/src/gallery/test/__snapshots__/index.js.snap @@ -7,20 +7,33 @@ exports[`core/gallery block edit matches snapshot 1`] = `
- + +
Gallery
{ controls } labels={ { title: __( 'Image' ), name: __( 'an image' ), diff --git a/packages/block-library/src/image/index.js b/packages/block-library/src/image/index.js index 3b7f246605a19..b2720ac7a7eb4 100644 --- a/packages/block-library/src/image/index.js +++ b/packages/block-library/src/image/index.js @@ -318,3 +318,5 @@ export const settings = { }, ], }; + +export const icon = settings.icon; diff --git a/packages/block-library/src/video/edit.js b/packages/block-library/src/video/edit.js index 295f3c0abcd18..6ce202956c5e6 100644 --- a/packages/block-library/src/video/edit.js +++ b/packages/block-library/src/video/edit.js @@ -16,6 +16,7 @@ import { import { Component, Fragment, createRef } from '@wordpress/element'; import { BlockControls, + BlockIcon, InspectorControls, MediaPlaceholder, MediaUpload, @@ -24,6 +25,11 @@ import { } from '@wordpress/editor'; import { getBlobByURL } from '@wordpress/blob'; +/** + * Internal dependencies + */ +import { icon } from './index'; + class VideoEdit extends Component { constructor() { super( ...arguments ); @@ -129,7 +135,7 @@ class VideoEdit extends Component { if ( editing ) { return ( labels={ { title: __( 'Video' ), name: __( 'a video' ), diff --git a/packages/block-library/src/video/index.js b/packages/block-library/src/video/index.js index 8f34b648ddf83..f7488f6ebe5a5 100644 --- a/packages/block-library/src/video/index.js +++ b/packages/block-library/src/video/index.js @@ -128,3 +128,5 @@ export const settings = { ); }, }; + +export const icon = settings.icon; diff --git a/packages/block-library/src/video/test/__snapshots__/index.js.snap b/packages/block-library/src/video/test/__snapshots__/index.js.snap index 33d0d470ec7da..3e154a7718e19 100644 --- a/packages/block-library/src/video/test/__snapshots__/index.js.snap +++ b/packages/block-library/src/video/test/__snapshots__/index.js.snap @@ -7,20 +7,25 @@ exports[`core/video block edit matches snapshot 1`] = `
- + +
Video