From 529d567feb4f57ec8b8db2ad3ea8cc8d276c4db5 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 29 Jan 2020 09:14:54 +0100 Subject: [PATCH] Move the insert dashicon to the icons package --- package-lock.json | 1 + packages/block-editor/package.json | 1 + .../src/components/block-list/style.scss | 3 ++- .../components/button-block-appender/index.js | 5 +++-- .../src/components/inserter/index.js | 7 +++---- .../src/components/inserter/style.scss | 7 ------- packages/components/src/button/style.scss | 17 +++++------------ .../src/custom-gradient-picker/index.js | 3 ++- packages/icons/src/index.js | 1 + packages/icons/src/library/plus-circle.js | 12 ++++++++++++ 10 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 packages/icons/src/library/plus-circle.js diff --git a/package-lock.json b/package-lock.json index 8070e078e471c..37784af821c31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10084,6 +10084,7 @@ "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", + "@wordpress/icons": "file:packages/icons", "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", "@wordpress/keyboard-shortcuts": "file:packages/keyboard-shortcuts", "@wordpress/keycodes": "file:packages/keycodes", diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 6c7718891501d..49b4e4fd8fa59 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -35,6 +35,7 @@ "@wordpress/hooks": "file:../hooks", "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", + "@wordpress/icons": "file:../icons", "@wordpress/is-shallow-equal": "file:../is-shallow-equal", "@wordpress/keyboard-shortcuts": "file:../keyboard-shortcuts", "@wordpress/keycodes": "file:../keycodes", diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index 4fe3262ed024a..739aa957b266d 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -418,7 +418,8 @@ background: $white; height: $block-padding * 2; width: $block-padding * 2; - padding: $grid-size-small; + padding: 0; + justify-content: center; &:not(:disabled):not([aria-disabled="true"]):hover { box-shadow: none; diff --git a/packages/block-editor/src/components/button-block-appender/index.js b/packages/block-editor/src/components/button-block-appender/index.js index 04ca29a71079f..abff6aea2d7d4 100644 --- a/packages/block-editor/src/components/button-block-appender/index.js +++ b/packages/block-editor/src/components/button-block-appender/index.js @@ -6,8 +6,9 @@ import classnames from 'classnames'; /** * WordPress dependencies */ -import { Button, Icon, Tooltip } from '@wordpress/components'; +import { Button, Tooltip } from '@wordpress/components'; import { _x, sprintf } from '@wordpress/i18n'; +import { Icon, plusCircle } from '@wordpress/icons'; /** * Internal dependencies @@ -39,7 +40,7 @@ function ButtonBlockAppender( { rootClientId, className, __experimentalSelectBlo label={ label } > { label } - + ); diff --git a/packages/block-editor/src/components/inserter/index.js b/packages/block-editor/src/components/inserter/index.js index f06d1d5a360d3..a5a8de9ace816 100644 --- a/packages/block-editor/src/components/inserter/index.js +++ b/packages/block-editor/src/components/inserter/index.js @@ -11,9 +11,8 @@ import { Dropdown, Button } from '@wordpress/components'; import { Component } from '@wordpress/element'; import { withDispatch, withSelect } from '@wordpress/data'; import { compose, ifCondition } from '@wordpress/compose'; -import { - createBlock, -} from '@wordpress/blocks'; +import { createBlock } from '@wordpress/blocks'; +import { plusCircle } from '@wordpress/icons'; /** * Internal dependencies @@ -30,7 +29,7 @@ const defaultRenderToggle = ( { onToggle, disabled, isOpen, blockTitle, hasSingl } return (