frontend/js/panel-config/panel-config.js
Paulus Schoutsen 90e6f59a74
Merge script and automation editor JS (#693)
* Merge script and automation editor JS

* Also consolidate the files
2017-11-30 11:38:21 -08:00

16 lines
449 B
JavaScript

import { h, render } from 'preact';
import Automation from './automation.js';
import Script from './script.js';
window.ScriptEditor = function (mountEl, props, mergeEl) {
return render(h(Script, props), mountEl, mergeEl);
};
window.AutomationEditor = function (mountEl, props, mergeEl) {
return render(h(Automation, props), mountEl, mergeEl);
};
window.unmountPreact = function (mountEl, mergeEl) {
render(() => null, mountEl, mergeEl);
};