Skip to content
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
8 changes: 2 additions & 6 deletions packages/editor/src/components/document-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { useSelect, useDispatch } from '@wordpress/data';
import {
Button,
__experimentalText as Text,
__experimentalHStack as HStack,
__unstableMotion as motion,
__unstableAnimatePresence as AnimatePresence,
} from '@wordpress/components';
Expand Down Expand Up @@ -155,11 +154,8 @@ export default function DocumentBar() {
onClick={ () => openCommandCenter() }
size="compact"
>
<HStack
as={ motion.div }
<motion.div
className="editor-document-bar__title"
spacing={ 1 }
justify="center"
// Force entry animation when the back button is added or removed.
key={ hasBackButton }
initial={
Expand Down Expand Up @@ -193,7 +189,7 @@ export default function DocumentBar() {
>
{ title }
</Text>
</HStack>
</motion.div>
<span className="editor-document-bar__shortcut">
{ displayShortcut.primary( 'k' ) }
</span>
Expand Down
4 changes: 4 additions & 0 deletions packages/editor/src/components/document-bar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
flex-grow: 1;
overflow: hidden;
color: $gray-800;
gap: $grid-unit-05;
display: flex;
justify-content: center;
align-items: center;

// Offset the layout based on the width of the ⌘K label. This ensures the title is centrally aligned.
@include break-small() {
Expand Down