moving things around

This commit is contained in:
ari committed 2022-08-05 22:04:31 -04:00
1 parent 549f52655b
commit d22bba8c4d
41 files changed
+227 -337

No files matched your search

@@ -1,20 +1,27 @@
import { OptionManager } from './OptionManager';
import { AutomationTriggerWebhook } from 'types/automations/triggers';
import InputText from 'components/Inputs/InputText';
import { OptionManager } from "./OptionManager";
import { AutomationTriggerWebhook } from "types/automations/triggers";
import InputText from "components/Inputs/Base/InputText";
export const TriggerWebhook: OptionManager<AutomationTriggerWebhook> = {
defaultState: () => ({
"platform": 'webhook',
"webhook_id": "",
platform: "webhook",
webhook_id: "",
}),
isReady: () => true,
renderOptionList: (state, setState) => {
return <>
<InputText label="Webhook ID" value={state.webhook_id ?? ""} onChange={webhook_id => setState({
...state,
webhook_id
})} />
</>
}
}
return (
<>
<InputText
label="Webhook ID"
value={state.webhook_id ?? ""}
onChange={(webhook_id) =>
setState({
...state,
webhook_id,
})
}
/>
</>
);
},
};