Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard icon and use in relative commands #53083

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/edit-post/src/hooks/commands/use-common-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
drawerLeft,
drawerRight,
blockDefault,
keyboardClose,
keyboard,
desktop,
listView,
} from '@wordpress/icons';
Expand Down Expand Up @@ -147,7 +147,7 @@ export default function useCommonCommands() {
useCommand( {
name: 'core/open-shortcut-help',
label: __( 'Open keyboard shortcuts' ),
icon: keyboardClose,
icon: keyboard,
callback: () => {
openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
blockDefault,
cog,
code,
keyboardClose,
keyboard,
} from '@wordpress/icons';
import { useCommandLoader } from '@wordpress/commands';
import { privateApis as routerPrivateApis } from '@wordpress/router';
Expand Down Expand Up @@ -259,7 +259,7 @@ function useEditUICommands() {
commands.push( {
name: 'core/open-shortcut-help',
label: __( 'Open keyboard shortcuts' ),
icon: keyboardClose,
icon: keyboard,
callback: () => {
openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );
},
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 @@ -123,6 +123,7 @@ export { default as justifyRight } from './library/justify-right';
export { default as justifySpaceBetween } from './library/justify-space-between';
export { default as justifyStretch } from './library/justify-stretch';
export { default as key } from './library/key';
export { default as keyboard } from './library/keyboard';
export { default as keyboardClose } from './library/keyboard-close';
export { default as keyboardReturn } from './library/keyboard-return';
export { default as language } from './library/language';
Expand Down
13 changes: 13 additions & 0 deletions packages/icons/src/library/keyboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const keyboard = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path d="m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z" />
<Path d="m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z" />
</SVG>
);

export default keyboard;
Loading