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

31 lines
564 B
JavaScript

import { h, Component } from 'preact';
import { onChangeEvent } from '../../common/util/event.js';
export default class TimeTrigger extends Component {
constructor() {
super();
this.onChange = onChangeEvent.bind(this, 'trigger');
}
/* eslint-disable camelcase */
render({ trigger }) {
const { at } = trigger;
return (
<div>
<paper-input
label="At"
name="at"
value={at}
onvalue-changed={this.onChange}
/>
</div>
);
}
}
TimeTrigger.defaultConfig = {
at: '',
};