diff --git a/packages/components/src/icon-button/index.js b/packages/components/src/icon-button/index.js index 745152409ccd46..eec8ecd913a51f 100644 --- a/packages/components/src/icon-button/index.js +++ b/packages/components/src/icon-button/index.js @@ -2,7 +2,7 @@ * External dependencies */ import classnames from 'classnames'; -import { isString, isArray } from 'lodash'; +import { isArray } from 'lodash'; /** * WordPress dependencies @@ -14,7 +14,7 @@ import { Component } from '@wordpress/element'; */ import Tooltip from '../tooltip'; import Button from '../button'; -import Dashicon from '../dashicon'; +import Icon from '../icon'; // This is intentionally a Component class, not a function component because it // is common to apply a ref to the button element (only supported in class) @@ -42,7 +42,7 @@ class IconButton extends Component { let element = ( ); diff --git a/packages/components/src/icon-button/test/index.js b/packages/components/src/icon-button/test/index.js index d5b67eec7930f6..b93f46a3c5bf66 100644 --- a/packages/components/src/icon-button/test/index.js +++ b/packages/components/src/icon-button/test/index.js @@ -20,7 +20,7 @@ describe( 'IconButton', () => { it( 'should render a Dashicon component matching the wordpress icon', () => { const iconButton = shallow( ); - expect( iconButton.find( 'Dashicon' ).shallow().hasClass( 'dashicons-wordpress' ) ).toBe( true ); + expect( iconButton.find( 'Icon' ).prop( 'icon' ) ).toBe( 'wordpress' ); } ); it( 'should render child elements when passed as children', () => { diff --git a/packages/edit-post/src/components/header/more-menu/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/header/more-menu/test/__snapshots__/index.js.snap index d1976a038ddb8d..5b451e3547f271 100644 --- a/packages/edit-post/src/components/header/more-menu/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/header/more-menu/test/__snapshots__/index.js.snap @@ -42,22 +42,16 @@ exports[`MoreMenu should match snapshot 1`] = ` onMouseLeave={[Function]} type="button" > - - - - - + > + + + + + + diff --git a/packages/editor/src/components/block-navigation/dropdown.js b/packages/editor/src/components/block-navigation/dropdown.js index 3fded1f9591efa..20910e4eebb042 100644 --- a/packages/editor/src/components/block-navigation/dropdown.js +++ b/packages/editor/src/components/block-navigation/dropdown.js @@ -4,15 +4,15 @@ import { Fragment } from '@wordpress/element'; import { IconButton, Dropdown, SVG, Path, KeyboardShortcuts } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { rawShortcut } from '@wordpress/keycodes'; +import { rawShortcut, displayShortcut } from '@wordpress/keycodes'; /** * Internal dependencies */ import BlockNavigation from './'; -const menuIcon = ( - +const MenuIcon = ( + ); @@ -29,11 +29,12 @@ function BlockNavigationDropdown() { } } /> ) }