Skip to content

Commit

Permalink
Fix Deleted Navigation Menu warning string (#55033)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and mikachan committed Oct 4, 2023
1 parent d11de67 commit 3c227eb
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
import { Warning } from '@wordpress/block-editor';
import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from '@wordpress/element';

function DeletedNavigationWarning( { onCreateNew } ) {
return (
<Warning>
{ __( 'Navigation menu has been deleted or is unavailable.' ) }
<Button onClick={ onCreateNew } variant="link">
{ __( 'Create a new menu?' ) }
</Button>
{ createInterpolateElement(
__(
'Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>'
),
{
button: <Button onClick={ onCreateNew } variant="link" />,
}
) }
</Warning>
);
}
Expand Down

0 comments on commit 3c227eb

Please sign in to comment.