diff --git a/blocks/header/header.editor.js b/blocks/header/header.editor.js new file mode 100644 index 00000000..50e4d1cd --- /dev/null +++ b/blocks/header/header.editor.js @@ -0,0 +1,51 @@ +export default function config() { + return { + attributes: { + data: { + type: { + type: 'select', + options: [ + { + label: 'Default', + value: 'default', + }, + { + label: 'Primary', + value: 'primary', + }, + { + label: 'Secondary', + value: 'secondary', + }, + { + label: 'Success', + value: 'success', + }, + { + label: 'Danger', + value: 'danger', + }, + { + label: 'Warning', + value: 'warning', + }, + { + label: 'Info', + value: 'info', + }, + { + label: 'Light', + value: 'light', + }, + { + label: 'Dark', + value: 'dark', + }, + ], + label: 'Type', + helpText: 'The type of the header.', + }, + }, + }, + }; +} diff --git a/scripts/editor.js b/scripts/editor.js index 5c5e1152..b75057a3 100644 --- a/scripts/editor.js +++ b/scripts/editor.js @@ -44,7 +44,6 @@ export function updateComponent(component) { } export function getComponentValues(dialog, element) { - console.log('get', dialog, element); const html = element.innerHTML; window.document.body.style.height = 'auto'; const domRect = element.getBoundingClientRect(); @@ -102,7 +101,12 @@ export default function initEditor(listeners = true) { publish( MessagesEvents.loaded, - { components: window.raqnEditor, bodyRect, baseURL: getBaseUrl() }, + { + components: window.raqnEditor, + bodyRect, + baseURL: getBaseUrl(), + masterConfig: window.raqnComponentsMasterConfig, + }, { usePostMessage: true, targetOrigin: '*' }, );