mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
* Fix eslint import extension * Update eslint hound * Enable no unresolved for normal usage
36 lines
711 B
JavaScript
36 lines
711 B
JavaScript
import { h, Component } from 'preact';
|
|
|
|
import { onChangeEvent } from '../../util/event.js';
|
|
|
|
export default class TimeCondition extends Component {
|
|
constructor() {
|
|
super();
|
|
|
|
this.onChange = onChangeEvent.bind(this, 'condition');
|
|
}
|
|
|
|
/* eslint-disable camelcase */
|
|
render({ condition }) {
|
|
const { after, before } = condition;
|
|
return (
|
|
<div>
|
|
<paper-input
|
|
label="After"
|
|
name="after"
|
|
value={after}
|
|
onChange={this.onChange}
|
|
/>
|
|
<paper-input
|
|
label="Before"
|
|
name="before"
|
|
value={before}
|
|
onChange={this.onChange}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
TimeCondition.defaultConfig = {
|
|
};
|