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

30 lines
575 B
JavaScript

import { h, Component } from 'preact';
import { onChangeEvent } from '../../common/util/event.js';
export default class DelayAction extends Component {
constructor() {
super();
this.onChange = onChangeEvent.bind(this, 'action');
}
render({ action }) {
const { delay } = action;
return (
<div>
<paper-input
label="Delay"
name="delay"
value={delay}
onvalue-changed={this.onChange}
/>
</div>
);
}
}
DelayAction.configKey = 'delay';
DelayAction.defaultConfig = {
delay: '',
};