Skip to content

Commit

Permalink
Feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rinkalpagdar committed Jan 13, 2025
1 parent 92eab2d commit bbd308b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/block-library/src/post-navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ import { __, _x } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';

/**
* Internal dependencies
*/
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

export default function PostNavigationLinkEdit( {
context: { postType },
attributes: {
Expand All @@ -48,6 +53,7 @@ export default function PostNavigationLinkEdit( {
};

const displayArrow = arrowMap[ arrow ];
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

if ( showTitle ) {
placeholder = isNext
Expand Down Expand Up @@ -95,13 +101,17 @@ export default function PostNavigationLinkEdit( {
return (
<>
<InspectorControls>
<ToolsPanel label={ __( 'Settings' ) }>
<ToolsPanel
label={ __( 'Settings' ) }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
hasValue={ () => !! showTitle }
label={ __( 'Display the title as a link' ) }
onDeselect={ () =>
setAttributes( { showTitle: false } )
}
isShownByDefault
>
<ToggleControl
__nextHasNoMarginBottom
Expand Down Expand Up @@ -136,6 +146,7 @@ export default function PostNavigationLinkEdit( {
hasValue={ () => !! arrow }
label={ __( 'Arrow' ) }
onDeselect={ () => setAttributes( { arrow: 'none' } ) }
isShownByDefault
>
<ToggleGroupControl
__next40pxDefaultSize
Expand Down

0 comments on commit bbd308b

Please sign in to comment.