Skip to content
Snippets Groups Projects
Commit 419ee957 authored by Bálint Kléri's avatar Bálint Kléri Committed by Wim Leers
Browse files

Issue #3506108 by balintbrews, wim leers, longwave: Editing code components as overrides, step 1

parent 1b140451
No related branches found
No related tags found
1 merge request!729#3506108: Change label to be a prop for `system_menu_block`
Pipeline #435841 canceled
...@@ -85,12 +85,11 @@ function template_preprocess_menu__as_js_component(array &$variables): void { ...@@ -85,12 +85,11 @@ function template_preprocess_menu__as_js_component(array &$variables): void {
$props = [ $props = [
'id' => $block_variables['attributes']['id'], 'id' => $block_variables['attributes']['id'],
'links' => $normalizeLinks($variables['items']), 'links' => $normalizeLinks($variables['items']),
];
$slots = [
'label' => $block_variables['label'] ?: $block_variables['configuration']['label'], 'label' => $block_variables['label'] ?: $block_variables['configuration']['label'],
]; ];
$slots = [];
$variables['children'] = _experience_builder_render_js_component_from_block_element( $variables['children'] = _experience_builder_render_js_component_from_block_element(
$block_variables['elements'], $block_variables['elements'],
$props, $props,
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
"isCollapsed": false, "isCollapsed": false,
"inActiveTrail": false "inActiveTrail": false
} }
] ],
}, "label": "Main navigation"
"slots": {
"label": "<div>Main navigation</div>"
} }
} }
...@@ -264,6 +264,7 @@ final class JavaScriptComponent extends ConfigEntityBase implements XbAssetInter ...@@ -264,6 +264,7 @@ final class JavaScriptComponent extends ConfigEntityBase implements XbAssetInter
return [ return [
'id' => ['type' => 'string'], 'id' => ['type' => 'string'],
'links' => ['type' => 'array'], 'links' => ['type' => 'array'],
'label' => ['type' => 'string'],
]; ];
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment