Skip to content

Commit

Permalink
Page List block: Don't wrap Edit button with ToolsPanelItem component (
Browse files Browse the repository at this point in the history
…WordPress#68248)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
4 people authored Dec 24, 2024
1 parent 182752e commit cdace81
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions packages/block-library/src/page-list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,24 +359,18 @@ export default function PageListEdit( {
) }

{ allowConvertToLinks && (
<ToolsPanelItem
label={ __( 'Edit Menu' ) }
isShownByDefault
hasValue={ () => false }
>
<div>
<p>{ convertDescription }</p>
<Button
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
onClick={ convertToNavigationLinks }
>
{ __( 'Edit' ) }
</Button>
</div>
</ToolsPanelItem>
<div style={ { gridColumn: '1 / -1' } }>
<p>{ convertDescription }</p>
<Button
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
onClick={ convertToNavigationLinks }
>
{ __( 'Edit' ) }
</Button>
</div>
) }
</ToolsPanel>
</InspectorControls>
Expand Down

0 comments on commit cdace81

Please sign in to comment.