Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jun 15, 2023
1 parent 5347105 commit d7dcf02
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export function BlockSettingsDropdown( {
onKeyDown={ ( event ) => {
if ( event.defaultPrevented ) return;

// TODO: can use `onEscapeKeyDown` prop instead?
if ( event.key === 'Escape' ) {
setIsDropdownOpen( false );
event.preventDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ function ConvertToGroupButton( {
<DropdownMenuItemV2
onClick={ () => {
onConvertFromGroup();
// onClose();
} }
>
{ _x(
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/template-part/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ export default function TemplatePartEdit( {
) }
{ canReplace && (
<BlockSettingsMenuControls>
{ /* TODO: check if this used in other legacy dropdown menus */ }
<DropdownMenuItemV2
onSelect={ ( event ) => {
setIsTemplatePartSelectionOpen( true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const PluginBlockSettingsMenuItem = ( {
return null;
}
return (
/* TODO: check if this used in other legacy dropdown menus */
<DropdownMenuItemV2
onSelect={ onClick }
prefix={ <Icon icon={ icon } size={ 24 } /> }
Expand Down

0 comments on commit d7dcf02

Please sign in to comment.