From b374e65de960870107da8dfcd3bb9e4c51a31b81 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 29 Jan 2020 10:16:31 +0100 Subject: [PATCH 1/4] Move Alignment, movers and trash icons to the icons package --- .../src/components/alignment-toolbar/index.js | 7 +- .../test/__snapshots__/index.js.snap | 38 ++++++++-- .../block-alignment-toolbar/index.js | 17 +++-- .../test/__snapshots__/index.js.snap | 38 ++++++++-- .../block-alignment-toolbar/test/index.js | 4 +- .../block-mobile-toolbar/index.native.js | 3 +- .../src/components/block-mover/icons.js | 14 +--- .../src/components/block-mover/index.js | 7 +- .../src/components/block-mover/test/index.js | 10 ++- .../components/block-settings-menu/index.js | 3 +- packages/block-library/src/table/edit.js | 8 +-- packages/components/src/panel/body.js | 13 +--- packages/components/src/panel/test/body.js | 2 +- .../test/__snapshots__/index.js.snap | 2 +- .../test/__snapshots__/index.js.snap | 2 +- packages/icons/src/index.js | 11 +++ .../icons/src/library/align-block-center.js | 13 ++++ .../src/library/align-block-full-width.js | 13 ++++ .../icons/src/library/align-block-left.js | 13 ++++ .../icons/src/library/align-block-right.js | 13 ++++ .../icons/src/library/align-block-wide.js | 13 ++++ packages/icons/src/library/align-center.js | 13 ++++ packages/icons/src/library/align-left.js | 13 ++++ packages/icons/src/library/align-right.js | 13 ++++ packages/icons/src/library/chevron-down.js | 12 ++++ packages/icons/src/library/chevron-up.js | 12 ++++ packages/icons/src/library/trash.js | 13 ++++ storybook/test/__snapshots__/index.js.snap | 72 ++++++------------- 28 files changed, 283 insertions(+), 109 deletions(-) create mode 100644 packages/icons/src/library/align-block-center.js create mode 100644 packages/icons/src/library/align-block-full-width.js create mode 100644 packages/icons/src/library/align-block-left.js create mode 100644 packages/icons/src/library/align-block-right.js create mode 100644 packages/icons/src/library/align-block-wide.js create mode 100644 packages/icons/src/library/align-center.js create mode 100644 packages/icons/src/library/align-left.js create mode 100644 packages/icons/src/library/align-right.js create mode 100644 packages/icons/src/library/chevron-down.js create mode 100644 packages/icons/src/library/chevron-up.js create mode 100644 packages/icons/src/library/trash.js diff --git a/packages/block-editor/src/components/alignment-toolbar/index.js b/packages/block-editor/src/components/alignment-toolbar/index.js index 4f3b9104e1928a..40dfa28c0ce882 100644 --- a/packages/block-editor/src/components/alignment-toolbar/index.js +++ b/packages/block-editor/src/components/alignment-toolbar/index.js @@ -8,20 +8,21 @@ import { find } from 'lodash'; */ import { __ } from '@wordpress/i18n'; import { Toolbar } from '@wordpress/components'; +import { alignLeft, alignRight, alignCenter } from '@wordpress/icons'; const DEFAULT_ALIGNMENT_CONTROLS = [ { - icon: 'editor-alignleft', + icon: alignLeft, title: __( 'Align text left' ), align: 'left', }, { - icon: 'editor-aligncenter', + icon: alignCenter, title: __( 'Align text center' ), align: 'center', }, { - icon: 'editor-alignright', + icon: alignRight, title: __( 'Align text right' ), align: 'right', }, diff --git a/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap index 87dc64ceda18fe..8ca05b1361631e 100644 --- a/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/alignment-toolbar/test/__snapshots__/index.js.snap @@ -34,7 +34,14 @@ exports[`AlignmentToolbar should match snapshot 1`] = ` Array [ Object { "align": "left", - "icon": "editor-alignleft", + "icon": + + , "isActive": true, "onClick": [Function], "role": "menuitemradio", @@ -42,7 +49,14 @@ exports[`AlignmentToolbar should match snapshot 1`] = ` }, Object { "align": "center", - "icon": "editor-aligncenter", + "icon": + + , "isActive": false, "onClick": [Function], "role": "menuitemradio", @@ -50,7 +64,14 @@ exports[`AlignmentToolbar should match snapshot 1`] = ` }, Object { "align": "right", - "icon": "editor-alignright", + "icon": + + , "isActive": false, "onClick": [Function], "role": "menuitemradio", @@ -58,7 +79,16 @@ exports[`AlignmentToolbar should match snapshot 1`] = ` }, ] } - icon="editor-alignleft" + icon={ + + + + } isCollapsed={true} label="Change text alignment" /> diff --git a/packages/block-editor/src/components/block-alignment-toolbar/index.js b/packages/block-editor/src/components/block-alignment-toolbar/index.js index da5dbb7317a3a4..2f559c5f946022 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/index.js +++ b/packages/block-editor/src/components/block-alignment-toolbar/index.js @@ -5,6 +5,13 @@ import { __ } from '@wordpress/i18n'; import { Toolbar } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; import { compose } from '@wordpress/compose'; +import { + alignBlockCenter, + alignBlockFullWidth, + alignBlockLeft, + alignBlockRight, + alignBlockWide, +} from '@wordpress/icons'; /** * Internal dependencies @@ -13,23 +20,23 @@ import { withBlockEditContext } from '../block-edit/context'; const BLOCK_ALIGNMENTS_CONTROLS = { left: { - icon: 'align-left', + icon: alignBlockLeft, title: __( 'Align left' ), }, center: { - icon: 'align-center', + icon: alignBlockCenter, title: __( 'Align center' ), }, right: { - icon: 'align-right', + icon: alignBlockRight, title: __( 'Align right' ), }, wide: { - icon: 'align-wide', + icon: alignBlockWide, title: __( 'Wide width' ), }, full: { - icon: 'align-full-width', + icon: alignBlockFullWidth, title: __( 'Full width' ), }, }; diff --git a/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap index ebc927c8eb816b..10e88985b76d5d 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/block-alignment-toolbar/test/__snapshots__/index.js.snap @@ -5,21 +5,42 @@ exports[`BlockAlignmentToolbar should match snapshot 1`] = ` controls={ Array [ Object { - "icon": "align-left", + "icon": + + , "isActive": true, "onClick": [Function], "role": "menuitemradio", "title": "Align left", }, Object { - "icon": "align-center", + "icon": + + , "isActive": false, "onClick": [Function], "role": "menuitemradio", "title": "Align center", }, Object { - "icon": "align-right", + "icon": + + , "isActive": false, "onClick": [Function], "role": "menuitemradio", @@ -27,7 +48,16 @@ exports[`BlockAlignmentToolbar should match snapshot 1`] = ` }, ] } - icon="align-left" + icon={ + + + + } isCollapsed={true} label="Change alignment" /> diff --git a/packages/block-editor/src/components/block-alignment-toolbar/test/index.js b/packages/block-editor/src/components/block-alignment-toolbar/test/index.js index c7a208006849ef..b92ab806746ecf 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/test/index.js +++ b/packages/block-editor/src/components/block-alignment-toolbar/test/index.js @@ -25,7 +25,7 @@ describe( 'BlockAlignmentToolbar', () => { } ); test( 'should call onChange with undefined, when the control is already active', () => { - const activeControl = controls.find( ( { icon } ) => icon === `align-${ alignment }` ); + const activeControl = controls.find( ( { title } ) => title === 'Align left' ); activeControl.onClick(); expect( activeControl.isActive ).toBe( true ); @@ -34,7 +34,7 @@ describe( 'BlockAlignmentToolbar', () => { } ); test( 'should call onChange with alignment value when the control is inactive', () => { - const inactiveCenterControl = controls.find( ( { icon } ) => icon === 'align-center' ); + const inactiveCenterControl = controls.find( ( { title } ) => title === 'Align center' ); inactiveCenterControl.onClick(); expect( inactiveCenterControl.isActive ).toBe( false ); diff --git a/packages/block-editor/src/components/block-mobile-toolbar/index.native.js b/packages/block-editor/src/components/block-mobile-toolbar/index.native.js index 46580878ff6843..4be16304d9937d 100644 --- a/packages/block-editor/src/components/block-mobile-toolbar/index.native.js +++ b/packages/block-editor/src/components/block-mobile-toolbar/index.native.js @@ -10,6 +10,7 @@ import { ToolbarButton } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; import { withDispatch, withSelect } from '@wordpress/data'; import { compose } from '@wordpress/compose'; +import { trash } from '@wordpress/icons'; /** * Internal dependencies @@ -39,7 +40,7 @@ const BlockMobileToolbar = ( { ) } onClick={ onDelete } - icon="trash" + icon={ trash } extraProps={ { hint: __( 'Double tap to remove the block' ) } } /> diff --git a/packages/block-editor/src/components/block-mover/icons.js b/packages/block-editor/src/components/block-mover/icons.js index 2a15b8a6159d5d..f3b575bd57a869 100644 --- a/packages/block-editor/src/components/block-mover/icons.js +++ b/packages/block-editor/src/components/block-mover/icons.js @@ -1,13 +1,7 @@ /** * WordPress dependencies */ -import { Path, Polygon, SVG } from '@wordpress/components'; - -export const upArrow = ( - - - -); +import { Path, SVG } from '@wordpress/components'; export const leftArrow = ( @@ -15,12 +9,6 @@ export const leftArrow = ( ); -export const downArrow = ( - - - -); - export const rightArrow = ( diff --git a/packages/block-editor/src/components/block-mover/index.js b/packages/block-editor/src/components/block-mover/index.js index 84475b9c60b982..ea5bb8c36d8fe3 100644 --- a/packages/block-editor/src/components/block-mover/index.js +++ b/packages/block-editor/src/components/block-mover/index.js @@ -18,7 +18,8 @@ import { withInstanceId, compose } from '@wordpress/compose'; * Internal dependencies */ import { getBlockMoverDescription } from './mover-description'; -import { leftArrow, rightArrow, upArrow, downArrow, dragHandle } from './icons'; +import { leftArrow, rightArrow, dragHandle } from './icons'; +import { chevronUp, chevronDown } from '@wordpress/icons'; import BlockDraggable from '../block-draggable'; export class BlockMover extends Component { @@ -56,12 +57,12 @@ export class BlockMover extends Component { if ( orientation === 'horizontal' ) { return isRTL ? rightArrow : leftArrow; } - return upArrow; + return chevronUp; } else if ( moveDirection === 'down' ) { if ( orientation === 'horizontal' ) { return isRTL ? leftArrow : rightArrow; } - return downArrow; + return chevronDown; } return null; }; diff --git a/packages/block-editor/src/components/block-mover/test/index.js b/packages/block-editor/src/components/block-mover/test/index.js index 5437249304829d..e413dc6e8680bd 100644 --- a/packages/block-editor/src/components/block-mover/test/index.js +++ b/packages/block-editor/src/components/block-mover/test/index.js @@ -3,11 +3,15 @@ */ import { shallow } from 'enzyme'; +/** + * WordPress dependencies + */ +import { chevronUp, chevronDown } from '@wordpress/icons'; + /** * Internal dependencies */ import { BlockMover } from '../'; -import { upArrow, downArrow } from '../icons'; describe( 'BlockMover', () => { describe( 'basic rendering', () => { @@ -45,7 +49,7 @@ describe( 'BlockMover', () => { className: 'block-editor-block-mover__control', onClick: undefined, label: 'Move up', - icon: upArrow, + icon: chevronUp, 'aria-disabled': undefined, 'aria-describedby': 'block-editor-block-mover__up-description-1', } ); @@ -53,7 +57,7 @@ describe( 'BlockMover', () => { className: 'block-editor-block-mover__control', onClick: undefined, label: 'Move down', - icon: downArrow, + icon: chevronDown, 'aria-disabled': undefined, 'aria-describedby': 'block-editor-block-mover__down-description-1', } ); diff --git a/packages/block-editor/src/components/block-settings-menu/index.js b/packages/block-editor/src/components/block-settings-menu/index.js index c73d3ca615eea5..375c585a5d4124 100644 --- a/packages/block-editor/src/components/block-settings-menu/index.js +++ b/packages/block-editor/src/components/block-settings-menu/index.js @@ -14,6 +14,7 @@ import { MenuItem, } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; +import { trash } from '@wordpress/icons'; /** * Internal dependencies @@ -120,7 +121,7 @@ export function BlockSettingsMenu( { clientIds } ) { { ! isLocked && ( { _n( 'Remove Block', 'Remove Blocks', count ) } diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index 92712c7d2b708a..33c0966e8376a6 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -26,7 +26,7 @@ import { ToggleControl, ToolbarGroup, } from '@wordpress/components'; -import { table as icon } from '@wordpress/icons'; +import { table as icon, alignLeft, alignRight, alignCenter } from '@wordpress/icons'; /** * Internal dependencies @@ -68,17 +68,17 @@ const BACKGROUND_COLORS = [ const ALIGNMENT_CONTROLS = [ { - icon: 'editor-alignleft', + icon: alignLeft, title: __( 'Align Column Left' ), align: 'left', }, { - icon: 'editor-aligncenter', + icon: alignCenter, title: __( 'Align Column Center' ), align: 'center', }, { - icon: 'editor-alignright', + icon: alignRight, title: __( 'Align Column Right' ), align: 'right', }, diff --git a/packages/components/src/panel/body.js b/packages/components/src/panel/body.js index af8cbe38a6dad0..e1e17a8a36aa7d 100644 --- a/packages/components/src/panel/body.js +++ b/packages/components/src/panel/body.js @@ -7,7 +7,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { Component, forwardRef } from '@wordpress/element'; -import { G, Path, SVG } from '@wordpress/primitives'; +import { chevronUp, chevronDown } from '@wordpress/icons'; /** * Internal dependencies @@ -56,16 +56,7 @@ export class PanelBody extends Component { repaints the whole element, so this wrapping span hides that. */ } { title } { icon && } diff --git a/packages/components/src/panel/test/body.js b/packages/components/src/panel/test/body.js index 78d4774afccd8d..180df741c946b5 100644 --- a/packages/components/src/panel/test/body.js +++ b/packages/components/src/panel/test/body.js @@ -23,7 +23,7 @@ describe( 'PanelBody', () => { expect( panelBody.state( 'opened' ) ).toBe( true ); expect( button.prop( 'onClick' ) ).toBe( panelBody.instance().toggle ); expect( button.childAt( 0 ).name() ).toBe( 'span' ); - expect( button.childAt( 0 ).childAt( 0 ).name() ).toBe( 'SVG' ); + expect( button.childAt( 0 ).childAt( 0 ).name() ).toBe( 'Icon' ); expect( button.childAt( 1 ).text() ).toBe( 'Some Text' ); } ); diff --git a/packages/edit-post/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap index c4c84425a8ba53..5b0fde0fa5a8af 100644 --- a/packages/edit-post/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PluginPostPublishPanel renders fill properly 1`] = `"

My panel content
"`; +exports[`PluginPostPublishPanel renders fill properly 1`] = `"

My panel content
"`; diff --git a/packages/edit-post/src/components/sidebar/plugin-pre-publish-panel/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/sidebar/plugin-pre-publish-panel/test/__snapshots__/index.js.snap index 9b509415dd4cd8..46104f10b65b4b 100644 --- a/packages/edit-post/src/components/sidebar/plugin-pre-publish-panel/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/sidebar/plugin-pre-publish-panel/test/__snapshots__/index.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PluginPrePublishPanel renders fill properly 1`] = `"

My panel content
"`; +exports[`PluginPrePublishPanel renders fill properly 1`] = `"

My panel content
"`; diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index 8f9e9f62e638e6..f2d135eb9ae8aa 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -1,12 +1,22 @@ export { default as Icon } from './icon'; +export { default as alignBlockCenter } from './library/align-block-center'; +export { default as alignBlockFullWidth } from './library/align-block-full-width'; +export { default as alignBlockLeft } from './library/align-block-left'; +export { default as alignBlockRight } from './library/align-block-right'; +export { default as alignBlockWide } from './library/align-block-wide'; +export { default as alignCenter } from './library/align-center'; export { default as alignJustify } from './library/align-justify'; +export { default as alignLeft } from './library/align-left'; +export { default as alignRight } from './library/align-right'; export { default as archive } from './library/archive'; export { default as audio } from './library/audio'; export { default as button } from './library/button'; export { default as calendar } from './library/calendar'; export { default as category } from './library/category'; export { default as check } from './library/check'; +export { default as chevronDown } from './library/chevron-down'; +export { default as chevronUp } from './library/chevron-up'; export { default as classic } from './library/classic'; export { default as code } from './library/code'; export { default as column } from './library/column'; @@ -40,6 +50,7 @@ export { default as shortcode } from './library/shortcode'; export { default as table } from './library/table'; export { default as tag } from './library/tag'; export { default as title } from './library/title'; +export { default as trash } from './library/trash'; export { default as verse } from './library/verse'; export { default as video } from './library/video'; export { default as widget } from './library/widget'; diff --git a/packages/icons/src/library/align-block-center.js b/packages/icons/src/library/align-block-center.js new file mode 100644 index 00000000000000..8a19846a797d8d --- /dev/null +++ b/packages/icons/src/library/align-block-center.js @@ -0,0 +1,13 @@ + +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignBlockCenter = ( + + + +); + +export default alignBlockCenter; diff --git a/packages/icons/src/library/align-block-full-width.js b/packages/icons/src/library/align-block-full-width.js new file mode 100644 index 00000000000000..6178c2682bfe50 --- /dev/null +++ b/packages/icons/src/library/align-block-full-width.js @@ -0,0 +1,13 @@ + +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignBlockFullWidth = ( + + + +); + +export default alignBlockFullWidth; diff --git a/packages/icons/src/library/align-block-left.js b/packages/icons/src/library/align-block-left.js new file mode 100644 index 00000000000000..0ef35aedf0199f --- /dev/null +++ b/packages/icons/src/library/align-block-left.js @@ -0,0 +1,13 @@ + +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignBlockLeft = ( + + + +); + +export default alignBlockLeft; diff --git a/packages/icons/src/library/align-block-right.js b/packages/icons/src/library/align-block-right.js new file mode 100644 index 00000000000000..226738aa63f64a --- /dev/null +++ b/packages/icons/src/library/align-block-right.js @@ -0,0 +1,13 @@ + +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignBlockRight = ( + + + +); + +export default alignBlockRight; diff --git a/packages/icons/src/library/align-block-wide.js b/packages/icons/src/library/align-block-wide.js new file mode 100644 index 00000000000000..71b434627d53fd --- /dev/null +++ b/packages/icons/src/library/align-block-wide.js @@ -0,0 +1,13 @@ + +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignBlockWide = ( + + + +); + +export default alignBlockWide; diff --git a/packages/icons/src/library/align-center.js b/packages/icons/src/library/align-center.js new file mode 100644 index 00000000000000..4b95f643d1061c --- /dev/null +++ b/packages/icons/src/library/align-center.js @@ -0,0 +1,13 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignCenter = ( + + + +); + +export default alignCenter; + diff --git a/packages/icons/src/library/align-left.js b/packages/icons/src/library/align-left.js new file mode 100644 index 00000000000000..a34551b910bcf6 --- /dev/null +++ b/packages/icons/src/library/align-left.js @@ -0,0 +1,13 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignLeft = ( + + + +); + +export default alignLeft; + diff --git a/packages/icons/src/library/align-right.js b/packages/icons/src/library/align-right.js new file mode 100644 index 00000000000000..9398e65c030d98 --- /dev/null +++ b/packages/icons/src/library/align-right.js @@ -0,0 +1,13 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const alignRight = ( + + + +); + +export default alignRight; + diff --git a/packages/icons/src/library/chevron-down.js b/packages/icons/src/library/chevron-down.js new file mode 100644 index 00000000000000..28fc23bb2cf3b5 --- /dev/null +++ b/packages/icons/src/library/chevron-down.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const chevronDown = ( + + + +); + +export default chevronDown; diff --git a/packages/icons/src/library/chevron-up.js b/packages/icons/src/library/chevron-up.js new file mode 100644 index 00000000000000..4ed1985d8fdcd9 --- /dev/null +++ b/packages/icons/src/library/chevron-up.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const chevronUp = ( + + + +); + +export default chevronUp; diff --git a/packages/icons/src/library/trash.js b/packages/icons/src/library/trash.js new file mode 100644 index 00000000000000..56c011563ac356 --- /dev/null +++ b/packages/icons/src/library/trash.js @@ -0,0 +1,13 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const trash = ( + + + +); + +export default trash; + diff --git a/storybook/test/__snapshots__/index.js.snap b/storybook/test/__snapshots__/index.js.snap index c5e1e1ac918fc1..16717c243e8b05 100644 --- a/storybook/test/__snapshots__/index.js.snap +++ b/storybook/test/__snapshots__/index.js.snap @@ -3883,23 +3883,15 @@ exports[`Storyshots Components/Panel Default 1`] = ` aria-hidden="true" className="components-panel__arrow" focusable="false" - height="24px" + height={24} role="img" viewBox="0 0 24 24" - width="24px" + width={24} xmlns="http://www.w3.org/2000/svg" > - - - - - - + My Block Settings @@ -3944,23 +3936,15 @@ exports[`Storyshots Components/Panel Multiple Bodies 1`] = ` aria-hidden="true" className="components-panel__arrow" focusable="false" - height="24px" + height={24} role="img" viewBox="0 0 24 24" - width="24px" + width={24} xmlns="http://www.w3.org/2000/svg" > - - - - - - + First Settings @@ -3991,23 +3975,15 @@ exports[`Storyshots Components/Panel Multiple Bodies 1`] = ` aria-hidden="true" className="components-panel__arrow" focusable="false" - height="24px" + height={24} role="img" viewBox="0 0 24 24" - width="24px" + width={24} xmlns="http://www.w3.org/2000/svg" > - - - - - - + Second Settings @@ -4047,23 +4023,15 @@ exports[`Storyshots Components/Panel With Icon 1`] = ` aria-hidden="true" className="components-panel__arrow" focusable="false" - height="24px" + height={24} role="img" viewBox="0 0 24 24" - width="24px" + width={24} xmlns="http://www.w3.org/2000/svg" > - - - - - - + My Block Settings From 9d264c197cc5064019015571c0c91f89e767dd2c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 29 Jan 2020 11:15:17 +0100 Subject: [PATCH 2/4] Fix e2e tests --- .../specs/editor/plugins/align-hook.test.js | 38 +++++++++++-------- .../editor/various/block-grouping.test.js | 6 ++- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/packages/e2e-tests/specs/editor/plugins/align-hook.test.js b/packages/e2e-tests/specs/editor/plugins/align-hook.test.js index b81e7c7a150164..16a61e53f568bf 100644 --- a/packages/e2e-tests/specs/editor/plugins/align-hook.test.js +++ b/packages/e2e-tests/specs/editor/plugins/align-hook.test.js @@ -12,6 +12,14 @@ import { setPostContent, } from '@wordpress/e2e-test-utils'; +const alignLabels = { + left: 'Align left', + center: 'Align center', + right: 'Align right', + wide: 'Wide width', + full: 'Full width', +}; + describe( 'Align Hook Works As Expected', () => { const CHANGE_ALIGNMENT_BUTTON_SELECTOR = '.block-editor-block-toolbar .components-dropdown-menu__toggle[aria-label="Change alignment"]'; @@ -76,12 +84,12 @@ describe( 'Align Hook Works As Expected', () => { const createCorrectlyAppliesAndRemovesAlignmentTest = ( blockName, alignment ) => { it( 'Correctly applies the selected alignment and correctly removes the alignment', async () => { - const BUTTON_SELECTOR = `.components-dropdown-menu__menu button svg.dashicons-align-${ alignment }`; + const BUTTON_XPATH = `//button[contains(@class,'components-dropdown-menu__menu-item') and contains(text(), '${ alignLabels[ alignment ] }')]`; const BUTTON_PRESSED_SELECTOR = '.components-dropdown-menu__menu button.is-active'; // set the specified alignment. await insertBlock( blockName ); await page.click( CHANGE_ALIGNMENT_BUTTON_SELECTOR ); - await page.click( BUTTON_SELECTOR ); + await ( await page.$x( BUTTON_XPATH ) )[ 0 ].click(); // verify the button of the specified alignment is pressed. await page.click( CHANGE_ALIGNMENT_BUTTON_SELECTOR ); @@ -102,7 +110,7 @@ describe( 'Align Hook Works As Expected', () => { // remove the alignment. await page.click( CHANGE_ALIGNMENT_BUTTON_SELECTOR ); - await page.click( BUTTON_SELECTOR ); + await ( await page.$x( BUTTON_XPATH ) )[ 0 ].click(); // verify no alignment button is in pressed state. await page.click( CHANGE_ALIGNMENT_BUTTON_SELECTOR ); @@ -150,11 +158,11 @@ describe( 'Align Hook Works As Expected', () => { const BLOCK_NAME = 'Test Align True'; createShowsTheExpectedButtonsTest( BLOCK_NAME, [ - 'Align left', - 'Align center', - 'Align right', - 'Wide width', - 'Full width', + alignLabels.left, + alignLabels.center, + alignLabels.right, + alignLabels.wide, + alignLabels.full, ] ); createDoesNotApplyAlignmentByDefaultTest( BLOCK_NAME ); @@ -166,8 +174,8 @@ describe( 'Align Hook Works As Expected', () => { const BLOCK_NAME = 'Test Align Array'; createShowsTheExpectedButtonsTest( BLOCK_NAME, [ - 'Align left', - 'Align center', + alignLabels.left, + alignLabels.center, ] ); createDoesNotApplyAlignmentByDefaultTest( BLOCK_NAME ); @@ -179,11 +187,11 @@ describe( 'Align Hook Works As Expected', () => { const BLOCK_NAME = 'Test Default Align'; const SELECTED_ALIGNMENT_CONTROL_SELECTOR = '//div[contains(@class, "components-dropdown-menu__menu")]//button[contains(@class, "is-active")][text()="Align right"]'; createShowsTheExpectedButtonsTest( BLOCK_NAME, [ - 'Align left', - 'Align center', - 'Align right', - 'Wide width', - 'Full width', + alignLabels.left, + alignLabels.center, + alignLabels.right, + alignLabels.wide, + alignLabels.full, ] ); it( 'Applies the selected alignment by default', async () => { diff --git a/packages/e2e-tests/specs/editor/various/block-grouping.test.js b/packages/e2e-tests/specs/editor/various/block-grouping.test.js index 8d12894a6b3111..4822aabe706e99 100644 --- a/packages/e2e-tests/specs/editor/various/block-grouping.test.js +++ b/packages/e2e-tests/specs/editor/various/block-grouping.test.js @@ -160,12 +160,14 @@ describe( 'Block Grouping', () => { // Full width image. await insertBlock( 'Image' ); await clickBlockToolbarButton( 'Change alignment' ); - await page.click( '.components-dropdown-menu__menu button svg.dashicons-align-full-width' ); + const FULL_WIDTH_BUTTON_XPATH = `//button[contains(@class,'components-dropdown-menu__menu-item') and contains(text(), 'Full width')]`; + await ( await page.$x( FULL_WIDTH_BUTTON_XPATH ) )[ 0 ].click(); // Wide width image. await insertBlock( 'Image' ); await clickBlockToolbarButton( 'Change alignment' ); - await page.click( '.components-dropdown-menu__menu button svg.dashicons-align-wide' ); + const WIDE_BUTTON_XPATH = `//button[contains(@class,'components-dropdown-menu__menu-item') and contains(text(), 'Wide width')]`; + await ( await page.$x( WIDE_BUTTON_XPATH ) )[ 0 ].click(); await insertBlock( 'Paragraph' ); await page.keyboard.type( 'Some paragraph' ); From 4fa0ddbaca679fff0f269ffee8b726f591f5a8b7 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 30 Jan 2020 09:40:14 +0100 Subject: [PATCH 3/4] Rename the alignment icons --- .../src/components/alignment-toolbar/index.js | 8 +++--- .../block-alignment-toolbar/index.js | 26 +++++++++---------- .../block-library/src/post-content/index.js | 2 +- packages/block-library/src/table/edit.js | 8 +++--- packages/icons/src/index.js | 18 ++++++------- ...ign-block-center.js => position-center.js} | 4 +-- .../{align-block-left.js => position-left.js} | 4 +-- ...align-block-right.js => position-right.js} | 4 +-- ...ck-full-width.js => stretch-full-width.js} | 4 +-- .../{align-block-wide.js => stretch-wide.js} | 4 +-- .../{align-center.js => text-align-center.js} | 4 +-- ...align-justify.js => text-align-justify.js} | 4 +-- .../{align-left.js => text-align-left.js} | 4 +-- .../{align-right.js => text-align-right.js} | 4 +-- 14 files changed, 49 insertions(+), 49 deletions(-) rename packages/icons/src/library/{align-block-center.js => position-center.js} (78%) rename packages/icons/src/library/{align-block-left.js => position-left.js} (81%) rename packages/icons/src/library/{align-block-right.js => position-right.js} (81%) rename packages/icons/src/library/{align-block-full-width.js => stretch-full-width.js} (76%) rename packages/icons/src/library/{align-block-wide.js => stretch-wide.js} (80%) rename packages/icons/src/library/{align-center.js => text-align-center.js} (80%) rename packages/icons/src/library/{align-justify.js => text-align-justify.js} (79%) rename packages/icons/src/library/{align-left.js => text-align-left.js} (81%) rename packages/icons/src/library/{align-right.js => text-align-right.js} (80%) diff --git a/packages/block-editor/src/components/alignment-toolbar/index.js b/packages/block-editor/src/components/alignment-toolbar/index.js index 40dfa28c0ce882..0f7ac41953dd9d 100644 --- a/packages/block-editor/src/components/alignment-toolbar/index.js +++ b/packages/block-editor/src/components/alignment-toolbar/index.js @@ -8,21 +8,21 @@ import { find } from 'lodash'; */ import { __ } from '@wordpress/i18n'; import { Toolbar } from '@wordpress/components'; -import { alignLeft, alignRight, alignCenter } from '@wordpress/icons'; +import { textAlignLeft, textAlignRight, textAlignCenter } from '@wordpress/icons'; const DEFAULT_ALIGNMENT_CONTROLS = [ { - icon: alignLeft, + icon: textAlignLeft, title: __( 'Align text left' ), align: 'left', }, { - icon: alignCenter, + icon: textAlignCenter, title: __( 'Align text center' ), align: 'center', }, { - icon: alignRight, + icon: textAlignRight, title: __( 'Align text right' ), align: 'right', }, diff --git a/packages/block-editor/src/components/block-alignment-toolbar/index.js b/packages/block-editor/src/components/block-alignment-toolbar/index.js index 2f559c5f946022..b3ac1df33142ca 100644 --- a/packages/block-editor/src/components/block-alignment-toolbar/index.js +++ b/packages/block-editor/src/components/block-alignment-toolbar/index.js @@ -6,11 +6,11 @@ import { Toolbar } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; import { compose } from '@wordpress/compose'; import { - alignBlockCenter, - alignBlockFullWidth, - alignBlockLeft, - alignBlockRight, - alignBlockWide, + positionCenter, + positionLeft, + positionRight, + stretchFullWidth, + stretchWide, } from '@wordpress/icons'; /** @@ -20,23 +20,23 @@ import { withBlockEditContext } from '../block-edit/context'; const BLOCK_ALIGNMENTS_CONTROLS = { left: { - icon: alignBlockLeft, + icon: positionLeft, title: __( 'Align left' ), }, center: { - icon: alignBlockCenter, + icon: positionCenter, title: __( 'Align center' ), }, right: { - icon: alignBlockRight, + icon: positionRight, title: __( 'Align right' ), }, wide: { - icon: alignBlockWide, + icon: stretchWide, title: __( 'Wide width' ), }, full: { - icon: alignBlockFullWidth, + icon: stretchFullWidth, title: __( 'Full width' ), }, }; @@ -50,9 +50,9 @@ export function BlockAlignmentToolbar( { value, onChange, controls = DEFAULT_CON return () => onChange( value === align ? undefined : align ); } - const enabledControls = wideControlsEnabled ? - controls : - controls.filter( ( control ) => WIDE_CONTROLS.indexOf( control ) === -1 ); + const enabledControls = wideControlsEnabled + ? controls + : controls.filter( ( control ) => WIDE_CONTROLS.indexOf( control ) === -1 ); const activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[ value ]; const defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ]; diff --git a/packages/block-library/src/post-content/index.js b/packages/block-library/src/post-content/index.js index 343b3bcf0810c0..af78e3cb34550e 100644 --- a/packages/block-library/src/post-content/index.js +++ b/packages/block-library/src/post-content/index.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { alignJustify as icon } from '@wordpress/icons'; +import { textAlignJustify as icon } from '@wordpress/icons'; /** * Internal dependencies diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index 33c0966e8376a6..38d11503099f4f 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -26,7 +26,7 @@ import { ToggleControl, ToolbarGroup, } from '@wordpress/components'; -import { table as icon, alignLeft, alignRight, alignCenter } from '@wordpress/icons'; +import { table as icon, textAlignLeft, textAlignRight, textAlignCenter } from '@wordpress/icons'; /** * Internal dependencies @@ -68,17 +68,17 @@ const BACKGROUND_COLORS = [ const ALIGNMENT_CONTROLS = [ { - icon: alignLeft, + icon: textAlignLeft, title: __( 'Align Column Left' ), align: 'left', }, { - icon: alignCenter, + icon: textAlignCenter, title: __( 'Align Column Center' ), align: 'center', }, { - icon: alignRight, + icon: textAlignRight, title: __( 'Align Column Right' ), align: 'right', }, diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index f2d135eb9ae8aa..96b6f0cc3514db 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -1,14 +1,5 @@ export { default as Icon } from './icon'; -export { default as alignBlockCenter } from './library/align-block-center'; -export { default as alignBlockFullWidth } from './library/align-block-full-width'; -export { default as alignBlockLeft } from './library/align-block-left'; -export { default as alignBlockRight } from './library/align-block-right'; -export { default as alignBlockWide } from './library/align-block-wide'; -export { default as alignCenter } from './library/align-center'; -export { default as alignJustify } from './library/align-justify'; -export { default as alignLeft } from './library/align-left'; -export { default as alignRight } from './library/align-right'; export { default as archive } from './library/archive'; export { default as audio } from './library/audio'; export { default as button } from './library/button'; @@ -37,6 +28,9 @@ export { default as more } from './library/more'; export { default as navigation } from './library/navigation'; export { default as pageBreak } from './library/page-break'; export { default as paragraph } from './library/paragraph'; +export { default as positionCenter } from './library/position-center'; +export { default as positionLeft } from './library/position-left'; +export { default as positionRight } from './library/position-right'; export { default as plusCircle } from './library/plus-circle'; export { default as postList } from './library/post-list'; export { default as preformatted } from './library/preformatted'; @@ -47,8 +41,14 @@ export { default as rss } from './library/rss'; export { default as search } from './library/search'; export { default as separator } from './library/separator'; export { default as shortcode } from './library/shortcode'; +export { default as stretchFullWidth } from './library/stretch-full-width'; +export { default as stretchWide } from './library/stretch-wide'; export { default as table } from './library/table'; export { default as tag } from './library/tag'; +export { default as textAlignCenter } from './library/text-align-center'; +export { default as textAlignJustify } from './library/text-align-justify'; +export { default as textAlignLeft } from './library/text-align-left'; +export { default as textAlignRight } from './library/text-align-right'; export { default as title } from './library/title'; export { default as trash } from './library/trash'; export { default as verse } from './library/verse'; diff --git a/packages/icons/src/library/align-block-center.js b/packages/icons/src/library/position-center.js similarity index 78% rename from packages/icons/src/library/align-block-center.js rename to packages/icons/src/library/position-center.js index 8a19846a797d8d..029f1f4a9aacab 100644 --- a/packages/icons/src/library/align-block-center.js +++ b/packages/icons/src/library/position-center.js @@ -4,10 +4,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignBlockCenter = ( +const positionCenter = ( ); -export default alignBlockCenter; +export default positionCenter; diff --git a/packages/icons/src/library/align-block-left.js b/packages/icons/src/library/position-left.js similarity index 81% rename from packages/icons/src/library/align-block-left.js rename to packages/icons/src/library/position-left.js index 0ef35aedf0199f..6a79937e30b7f2 100644 --- a/packages/icons/src/library/align-block-left.js +++ b/packages/icons/src/library/position-left.js @@ -4,10 +4,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignBlockLeft = ( +const positionLeft = ( ); -export default alignBlockLeft; +export default positionLeft; diff --git a/packages/icons/src/library/align-block-right.js b/packages/icons/src/library/position-right.js similarity index 81% rename from packages/icons/src/library/align-block-right.js rename to packages/icons/src/library/position-right.js index 226738aa63f64a..d5918265696923 100644 --- a/packages/icons/src/library/align-block-right.js +++ b/packages/icons/src/library/position-right.js @@ -4,10 +4,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignBlockRight = ( +const positionRight = ( ); -export default alignBlockRight; +export default positionRight; diff --git a/packages/icons/src/library/align-block-full-width.js b/packages/icons/src/library/stretch-full-width.js similarity index 76% rename from packages/icons/src/library/align-block-full-width.js rename to packages/icons/src/library/stretch-full-width.js index 6178c2682bfe50..e27b0ab2c2eee8 100644 --- a/packages/icons/src/library/align-block-full-width.js +++ b/packages/icons/src/library/stretch-full-width.js @@ -4,10 +4,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignBlockFullWidth = ( +const stretchFullWidth = ( ); -export default alignBlockFullWidth; +export default stretchFullWidth; diff --git a/packages/icons/src/library/align-block-wide.js b/packages/icons/src/library/stretch-wide.js similarity index 80% rename from packages/icons/src/library/align-block-wide.js rename to packages/icons/src/library/stretch-wide.js index 71b434627d53fd..6bdda30ede996a 100644 --- a/packages/icons/src/library/align-block-wide.js +++ b/packages/icons/src/library/stretch-wide.js @@ -4,10 +4,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignBlockWide = ( +const stretchWide = ( ); -export default alignBlockWide; +export default stretchWide; diff --git a/packages/icons/src/library/align-center.js b/packages/icons/src/library/text-align-center.js similarity index 80% rename from packages/icons/src/library/align-center.js rename to packages/icons/src/library/text-align-center.js index 4b95f643d1061c..6e942e24598a57 100644 --- a/packages/icons/src/library/align-center.js +++ b/packages/icons/src/library/text-align-center.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignCenter = ( +const textAlignCenter = ( ); -export default alignCenter; +export default textAlignCenter; diff --git a/packages/icons/src/library/align-justify.js b/packages/icons/src/library/text-align-justify.js similarity index 79% rename from packages/icons/src/library/align-justify.js rename to packages/icons/src/library/text-align-justify.js index f6f9a3a47e4a9d..fe641e91a09250 100644 --- a/packages/icons/src/library/align-justify.js +++ b/packages/icons/src/library/text-align-justify.js @@ -3,10 +3,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignJustify = ( +const textAlignJustify = ( ); -export default alignJustify; +export default textAlignJustify; diff --git a/packages/icons/src/library/align-left.js b/packages/icons/src/library/text-align-left.js similarity index 81% rename from packages/icons/src/library/align-left.js rename to packages/icons/src/library/text-align-left.js index a34551b910bcf6..1cc8b911b54a12 100644 --- a/packages/icons/src/library/align-left.js +++ b/packages/icons/src/library/text-align-left.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignLeft = ( +const textAlignLeft = ( ); -export default alignLeft; +export default textAlignLeft; diff --git a/packages/icons/src/library/align-right.js b/packages/icons/src/library/text-align-right.js similarity index 80% rename from packages/icons/src/library/align-right.js rename to packages/icons/src/library/text-align-right.js index 9398e65c030d98..814ef62550fb56 100644 --- a/packages/icons/src/library/align-right.js +++ b/packages/icons/src/library/text-align-right.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const alignRight = ( +const textAlignRight = ( ); -export default alignRight; +export default textAlignRight; From 1c6866fa17f22f364be6577e6a5ffbad088a8b86 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 30 Jan 2020 10:26:42 +0100 Subject: [PATCH 4/4] Rename text alignments --- .../src/components/alignment-toolbar/index.js | 8 ++++---- packages/block-library/src/post-content/index.js | 2 +- packages/block-library/src/table/edit.js | 8 ++++---- packages/icons/src/index.js | 8 ++++---- .../src/library/{text-align-center.js => align-center.js} | 4 ++-- .../library/{text-align-justify.js => align-justify.js} | 4 ++-- .../src/library/{text-align-left.js => align-left.js} | 4 ++-- .../src/library/{text-align-right.js => align-right.js} | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) rename packages/icons/src/library/{text-align-center.js => align-center.js} (80%) rename packages/icons/src/library/{text-align-justify.js => align-justify.js} (79%) rename packages/icons/src/library/{text-align-left.js => align-left.js} (81%) rename packages/icons/src/library/{text-align-right.js => align-right.js} (80%) diff --git a/packages/block-editor/src/components/alignment-toolbar/index.js b/packages/block-editor/src/components/alignment-toolbar/index.js index 0f7ac41953dd9d..40dfa28c0ce882 100644 --- a/packages/block-editor/src/components/alignment-toolbar/index.js +++ b/packages/block-editor/src/components/alignment-toolbar/index.js @@ -8,21 +8,21 @@ import { find } from 'lodash'; */ import { __ } from '@wordpress/i18n'; import { Toolbar } from '@wordpress/components'; -import { textAlignLeft, textAlignRight, textAlignCenter } from '@wordpress/icons'; +import { alignLeft, alignRight, alignCenter } from '@wordpress/icons'; const DEFAULT_ALIGNMENT_CONTROLS = [ { - icon: textAlignLeft, + icon: alignLeft, title: __( 'Align text left' ), align: 'left', }, { - icon: textAlignCenter, + icon: alignCenter, title: __( 'Align text center' ), align: 'center', }, { - icon: textAlignRight, + icon: alignRight, title: __( 'Align text right' ), align: 'right', }, diff --git a/packages/block-library/src/post-content/index.js b/packages/block-library/src/post-content/index.js index af78e3cb34550e..343b3bcf0810c0 100644 --- a/packages/block-library/src/post-content/index.js +++ b/packages/block-library/src/post-content/index.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { textAlignJustify as icon } from '@wordpress/icons'; +import { alignJustify as icon } from '@wordpress/icons'; /** * Internal dependencies diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index 38d11503099f4f..33c0966e8376a6 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -26,7 +26,7 @@ import { ToggleControl, ToolbarGroup, } from '@wordpress/components'; -import { table as icon, textAlignLeft, textAlignRight, textAlignCenter } from '@wordpress/icons'; +import { table as icon, alignLeft, alignRight, alignCenter } from '@wordpress/icons'; /** * Internal dependencies @@ -68,17 +68,17 @@ const BACKGROUND_COLORS = [ const ALIGNMENT_CONTROLS = [ { - icon: textAlignLeft, + icon: alignLeft, title: __( 'Align Column Left' ), align: 'left', }, { - icon: textAlignCenter, + icon: alignCenter, title: __( 'Align Column Center' ), align: 'center', }, { - icon: textAlignRight, + icon: alignRight, title: __( 'Align Column Right' ), align: 'right', }, diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index 96b6f0cc3514db..356b2784ce5216 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -1,5 +1,9 @@ export { default as Icon } from './icon'; +export { default as alignCenter } from './library/align-center'; +export { default as alignJustify } from './library/align-justify'; +export { default as alignLeft } from './library/align-left'; +export { default as alignRight } from './library/align-right'; export { default as archive } from './library/archive'; export { default as audio } from './library/audio'; export { default as button } from './library/button'; @@ -45,10 +49,6 @@ export { default as stretchFullWidth } from './library/stretch-full-width'; export { default as stretchWide } from './library/stretch-wide'; export { default as table } from './library/table'; export { default as tag } from './library/tag'; -export { default as textAlignCenter } from './library/text-align-center'; -export { default as textAlignJustify } from './library/text-align-justify'; -export { default as textAlignLeft } from './library/text-align-left'; -export { default as textAlignRight } from './library/text-align-right'; export { default as title } from './library/title'; export { default as trash } from './library/trash'; export { default as verse } from './library/verse'; diff --git a/packages/icons/src/library/text-align-center.js b/packages/icons/src/library/align-center.js similarity index 80% rename from packages/icons/src/library/text-align-center.js rename to packages/icons/src/library/align-center.js index 6e942e24598a57..4b95f643d1061c 100644 --- a/packages/icons/src/library/text-align-center.js +++ b/packages/icons/src/library/align-center.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const textAlignCenter = ( +const alignCenter = ( ); -export default textAlignCenter; +export default alignCenter; diff --git a/packages/icons/src/library/text-align-justify.js b/packages/icons/src/library/align-justify.js similarity index 79% rename from packages/icons/src/library/text-align-justify.js rename to packages/icons/src/library/align-justify.js index fe641e91a09250..f6f9a3a47e4a9d 100644 --- a/packages/icons/src/library/text-align-justify.js +++ b/packages/icons/src/library/align-justify.js @@ -3,10 +3,10 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const textAlignJustify = ( +const alignJustify = ( ); -export default textAlignJustify; +export default alignJustify; diff --git a/packages/icons/src/library/text-align-left.js b/packages/icons/src/library/align-left.js similarity index 81% rename from packages/icons/src/library/text-align-left.js rename to packages/icons/src/library/align-left.js index 1cc8b911b54a12..a34551b910bcf6 100644 --- a/packages/icons/src/library/text-align-left.js +++ b/packages/icons/src/library/align-left.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const textAlignLeft = ( +const alignLeft = ( ); -export default textAlignLeft; +export default alignLeft; diff --git a/packages/icons/src/library/text-align-right.js b/packages/icons/src/library/align-right.js similarity index 80% rename from packages/icons/src/library/text-align-right.js rename to packages/icons/src/library/align-right.js index 814ef62550fb56..9398e65c030d98 100644 --- a/packages/icons/src/library/text-align-right.js +++ b/packages/icons/src/library/align-right.js @@ -3,11 +3,11 @@ */ import { SVG, Path } from '@wordpress/primitives'; -const textAlignRight = ( +const alignRight = ( ); -export default textAlignRight; +export default alignRight;