Skip to content

Commit

Permalink
Navigation Submenu Block: Add example preview (#68378)
Browse files Browse the repository at this point in the history
* Navigation Submenu Block: Add example preview

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
  • Loading branch information
3 people authored Jan 27, 2025
1 parent 868135f commit b984ec9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/navigation-submenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { page, addSubmenu } from '@wordpress/icons';
import { _x } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -37,6 +38,12 @@ export const settings = {
return label;
},
edit,
example: {
attributes: {
label: _x( 'About', 'Example link text for Navigation Submenu' ),
type: 'page',
},
},
save,
transforms,
};
Expand Down

0 comments on commit b984ec9

Please sign in to comment.