From 61a84ef4614ce35f88d71aedd4693f687179259d Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Wed, 5 Apr 2023 15:06:12 -0400 Subject: [PATCH] Update media and video icons (#49523) * Use media icon in core/media-text Media Container * Update media.js icon with new media icon (image + video display) * Use video icon for existing media icon implementations * Update media icon * Use media icon for media library * Trigger test * Trigger test * Update media-container.native.js --- .../src/media-text/media-container-icon.js | 12 ------------ .../block-library/src/media-text/media-container.js | 6 +----- .../src/media-text/media-container.native.js | 2 +- packages/icons/src/library/media.js | 7 ++++++- 4 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 packages/block-library/src/media-text/media-container-icon.js diff --git a/packages/block-library/src/media-text/media-container-icon.js b/packages/block-library/src/media-text/media-container-icon.js deleted file mode 100644 index e5eb65d261dc58..00000000000000 --- a/packages/block-library/src/media-text/media-container-icon.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * WordPress dependencies - */ -import { Path, SVG } from '@wordpress/components'; - -export default ( - - - - - -); diff --git a/packages/block-library/src/media-text/media-container.js b/packages/block-library/src/media-text/media-container.js index f2bdb475bae345..e5a6270bad8dc9 100644 --- a/packages/block-library/src/media-text/media-container.js +++ b/packages/block-library/src/media-text/media-container.js @@ -20,11 +20,7 @@ import { useDispatch } from '@wordpress/data'; import { forwardRef } from '@wordpress/element'; import { isBlobURL } from '@wordpress/blob'; import { store as noticesStore } from '@wordpress/notices'; - -/** - * Internal dependencies - */ -import icon from './media-container-icon'; +import { media as icon } from '@wordpress/icons'; /** * Constants diff --git a/packages/block-library/src/media-text/media-container.native.js b/packages/block-library/src/media-text/media-container.native.js index a131abc9deba6c..2057486b73ac9c 100644 --- a/packages/block-library/src/media-text/media-container.native.js +++ b/packages/block-library/src/media-text/media-container.native.js @@ -26,12 +26,12 @@ import { Component } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { isURL, getProtocol } from '@wordpress/url'; import { compose, withPreferredColorScheme } from '@wordpress/compose'; +import { media as icon } from '@wordpress/icons'; /** * Internal dependencies */ import styles from './style.scss'; -import icon from './media-container-icon'; import SvgIconRetry from './icon-retry'; /** diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index 23b1b1f7ecd527..a3f5cad616469d 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -5,7 +5,12 @@ import { SVG, Path } from '@wordpress/primitives'; const media = ( - + + );