@@ -155,36 +344,75 @@ function Navigation( {
className="wp-block-navigation-placeholder"
icon={ icon }
label={ __( 'Navigation' ) }
- instructions={ __(
- 'Create a Navigation from all existing pages, or create an empty one.'
- ) }
+ instructions={ buildPlaceholderInstructionText() }
>
-
-
-
-
+ ) : (
+
- { __( 'Create empty' ) }
-
-
+ <>
+ {
+ if (
+ selectedItem?.key ===
+ selectedCreateActionOptionKey
+ ) {
+ return;
+ }
+ setSelectedCreateActionOption(
+ selectedItem
+ );
+ } }
+ options={ createActionOptions.map(
+ ( option ) => {
+ return {
+ ...option,
+ key: option.id,
+ };
+ }
+ ) }
+ />
+
+ >
+
+ ) }
);
}
+ const blockInlineStyles = {
+ fontSize: fontSize.size ? fontSize.size + 'px' : undefined,
+ };
+
const blockClassNames = classnames( className, {
[ `items-justified-${ attributes.itemsJustification }` ]: attributes.itemsJustification,
[ fontSize.class ]: fontSize.class,
@@ -193,7 +421,7 @@ function Navigation( {
// UI State: rendered Block UI
return (
-