From ddc365bed93ff254e51dd4403ae518c97d3951fa Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 15 Dec 2022 12:28:43 +0100 Subject: [PATCH] used smaller lock icon on off canvas editor --- .../off-canvas-editor/block-select-button.js | 4 ++-- .../src/components/off-canvas-editor/style.scss | 8 ++++++++ packages/icons/src/index.js | 1 + packages/icons/src/library/lock-small.js | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 packages/icons/src/library/lock-small.js diff --git a/packages/block-editor/src/components/off-canvas-editor/block-select-button.js b/packages/block-editor/src/components/off-canvas-editor/block-select-button.js index a3cb64e9298dd4..47c82fe8596072 100644 --- a/packages/block-editor/src/components/off-canvas-editor/block-select-button.js +++ b/packages/block-editor/src/components/off-canvas-editor/block-select-button.js @@ -12,7 +12,7 @@ import { __experimentalTruncate as Truncate, } from '@wordpress/components'; import { forwardRef } from '@wordpress/element'; -import { Icon, lock } from '@wordpress/icons'; +import { Icon, lockSmall as lock } from '@wordpress/icons'; import { SPACE, ENTER } from '@wordpress/keycodes'; /** @@ -104,7 +104,7 @@ function ListViewBlockSelectButton( ) } { isLocked && ( - + ) } diff --git a/packages/block-editor/src/components/off-canvas-editor/style.scss b/packages/block-editor/src/components/off-canvas-editor/style.scss index 8fedf057b03333..8271041b368e24 100644 --- a/packages/block-editor/src/components/off-canvas-editor/style.scss +++ b/packages/block-editor/src/components/off-canvas-editor/style.scss @@ -23,4 +23,12 @@ display: block; // sidebar width - tab panel padding max-width: $sidebar-width - (2 * $grid-unit-20); + .offcanvas-editor-list-view-block-select-button__lock { + display: inline-flex; + justify-content: center; + align-items: center; + overflow: hidden; + width: 16px; + height: 16px; + } } diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index 92bc48c185cc99..77c974fc61211f 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -129,6 +129,7 @@ export { default as listItem } from './library/list-item'; export { default as listView } from './library/list-view'; export { default as lock } from './library/lock'; export { default as lockOutline } from './library/lock-outline'; +export { default as lockSmall } from './library/lock-small'; export { default as login } from './library/login'; export { default as loop } from './library/loop'; export { default as mapMarker } from './library/map-marker'; diff --git a/packages/icons/src/library/lock-small.js b/packages/icons/src/library/lock-small.js new file mode 100644 index 00000000000000..9ed94cc264b003 --- /dev/null +++ b/packages/icons/src/library/lock-small.js @@ -0,0 +1,16 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const lockSmall = ( + + + +); + +export default lockSmall;