import { h, Component } from 'preact'; import JSONTextArea from '../json_textarea'; export default class CallServiceAction extends Component { constructor() { super(); this.onChange = this.onChange.bind(this); this.serviceDataChanged = this.serviceDataChanged.bind(this); } onChange(ev) { this.props.onChange(this.props.index, { ...this.props.action, [ev.target.name]: ev.target.value }); } /* eslint-disable camelcase */ serviceDataChanged(data) { this.props.onChange(this.props.index, { ...this.props.action, data, }); } render({ action }) { const { alias, service, data } = action; return (