Skip to content

Commit 483b752

Browse files
committed
update the document actions design
1 parent dea6cc7 commit 483b752

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

packages/edit-site/src/components/header-edit-mode/document-actions/index.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,18 @@ export default function DocumentActions() {
4242
? __( 'template part' )
4343
: __( 'template' );
4444

45+
const isMac = /Mac|iPod|iPhone|iPad/.test( window.navigator.platform );
46+
4547
return (
4648
<div className="edit-site-document-actions">
47-
<span></span>
49+
<span className="edit-site-document-actions__left"></span>
4850
<Text
4951
size="body"
5052
as="h1"
5153
className="edit-site-document-actions__title"
5254
>
5355
<Button onClick={ () => openCommandCenter() }>
56+
<BlockIcon icon={ icon } />
5457
<VisuallyHidden as="span">
5558
{ sprintf(
5659
/* translators: %s: the entity being edited, like "template"*/
@@ -61,7 +64,12 @@ export default function DocumentActions() {
6164
{ getTitle() }
6265
</Button>
6366
</Text>
64-
<BlockIcon icon={ icon } />
67+
<Button
68+
className="edit-site-document-actions__shortcut"
69+
onClick={ openCommandCenter }
70+
>
71+
{ isMac ? '⌘' : 'Ctrl' } K
72+
</Button>
6573
</div>
6674
);
6775
}

packages/edit-site/src/components/header-edit-mode/document-actions/style.scss

+11
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,14 @@
3434
justify-content: center;
3535
}
3636
}
37+
38+
.edit-site-document-actions__shortcut {
39+
color: $gray-700;
40+
&:hover {
41+
color: $gray-700;
42+
}
43+
}
44+
45+
.edit-site-document-actions__left {
46+
min-width: $button-size;
47+
}

0 commit comments

Comments
 (0)