From bdb22cd7ab953c0830fe33ac69e5f0ecda529062 Mon Sep 17 00:00:00 2001 From: Matias Ventura Date: Tue, 2 May 2023 10:57:14 +0200 Subject: [PATCH] Display device icon on "preview" and "view" buttons (#50218) --- .../src/components/preview-options/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/preview-options/index.js b/packages/block-editor/src/components/preview-options/index.js index 2b4c0dc7a95fe..d173542e02570 100644 --- a/packages/block-editor/src/components/preview-options/index.js +++ b/packages/block-editor/src/components/preview-options/index.js @@ -9,7 +9,7 @@ import classnames from 'classnames'; import { useViewportMatch } from '@wordpress/compose'; import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { check } from '@wordpress/icons'; +import { check, desktop, mobile, tablet } from '@wordpress/icons'; export default function PreviewOptions( { children, @@ -38,13 +38,20 @@ export default function PreviewOptions( { const menuProps = { 'aria-label': __( 'View options' ), }; + + const deviceIcons = { + mobile, + tablet, + desktop, + }; + return ( { () => ( <>