Skip to content

Commit

Permalink
Refactor: Rename onEvent to onCopy in CopyMenuItem
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 9, 2025
1 parent bf79be1 commit 98cdf42
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const POPOVER_PROPS = {

function CopyMenuItem( {
clientIds,
onEvent,
onCopy,
label,
shortcut,
eventType = 'copy',
Expand All @@ -49,7 +49,7 @@ function CopyMenuItem( {
switch ( eventType ) {
case 'copy':
case 'cut':
onEvent?.();
onCopy?.();
notifyCopy( eventType, clientIds );
if ( eventType === 'cut' ) {
removeBlocks( clientIds, updateSelection );
Expand Down Expand Up @@ -276,12 +276,12 @@ export function BlockSettingsDropdown( {
) }
<CopyMenuItem
clientIds={ clientIds }
onEvent={ onCopy }
onCopy={ onCopy }
shortcut={ shortcuts.copy }
/>
<CopyMenuItem
clientIds={ clientIds }
onEvent={ onCopy }
onCopy={ onCopy }
label={ __( 'Cut' ) }
eventType="cut"
shortcut={ shortcuts.cut }
Expand Down Expand Up @@ -335,7 +335,7 @@ export function BlockSettingsDropdown( {
<MenuGroup>
<CopyMenuItem
clientIds={ clientIds }
onEvent={ onCopy }
onCopy={ onCopy }
label={ __( 'Copy styles' ) }
eventType="copyStyles"
/>
Expand Down

0 comments on commit 98cdf42

Please sign in to comment.