Skip to content

Commit

Permalink
Navigation list view: use smaller lock icon (#46578)
Browse files Browse the repository at this point in the history
* used smaller lock icon on off canvas editor

* reduce size of lock icon on list view too

* removed repeated css
  • Loading branch information
MaggieCabrera authored Dec 16, 2022
1 parent 8690500 commit f19cbe2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
7 changes: 6 additions & 1 deletion packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,16 @@

.block-editor-list-view-block-select-button__lock {
line-height: 0;
width: 24px;
width: 16px;
min-width: 24px;
height: 16px;
margin-left: auto;
padding: 0;
vertical-align: middle;
display: inline-flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
1 change: 1 addition & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
16 changes: 16 additions & 0 deletions packages/icons/src/library/lock-small.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const lockSmall = (
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<Path
fillRule="evenodd"
clipRule="evenodd"
d="M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"
/>
</SVG>
);

export default lockSmall;

1 comment on commit f19cbe2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3714546577
📝 Reported issues:

Please sign in to comment.