Skip to content
Merged
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
19 changes: 4 additions & 15 deletions packages/editor/src/hooks/template-part-navigation-edit-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ import { createHigherOrderComponent } from '@wordpress/compose';
import { useCallback } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import {
BlockControls,
__unstableBlockToolbarLastItem as BlockToolbarLastItem,
store as blockEditorStore,
} from '@wordpress/block-editor';
import {
ToolbarButton,
ToolbarGroup,
__experimentalDivider as Divider,
} from '@wordpress/components';
import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { store as interfaceStore } from '@wordpress/interface';

Expand Down Expand Up @@ -96,23 +92,16 @@ function TemplatePartNavigationEditButton( { clientId } ) {
}

return (
<BlockControls group="other">
<BlockToolbarLastItem>
<ToolbarGroup>
{ /*
* Add a vertical divider to visually separate the "Edit navigation"
* button from the template part's "Edit" button. Both buttons share
* the same toolbar group ("other"), so without this divider they
* would appear directly adjacent with no visual separation.
*/ }
<Divider orientation="vertical" marginEnd={ 3 } />
<ToolbarButton
label={ __( 'Edit navigation' ) }
onClick={ onEditNavigation }
>
{ __( 'Edit navigation' ) }
</ToolbarButton>
</ToolbarGroup>
</BlockControls>
</BlockToolbarLastItem>
);
}

Expand Down
Loading