mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
19 lines
563 B
TypeScript
19 lines
563 B
TypeScript
import { FetchTask } from "flows";
|
|
import { useState } from "react";
|
|
import { TaskForm } from "ui/modules/flows/components/form/TaskForm";
|
|
|
|
export default function FlowFormTest() {
|
|
const [data, setData] = useState(null);
|
|
const task = new FetchTask("Fetch Something", {
|
|
url: "https://jsonplaceholder.typicode.com/todos/1",
|
|
method: "{{ input.mode }}",
|
|
});
|
|
|
|
return (
|
|
<div className="flex flex-col p-3">
|
|
<TaskForm task={task} onChange={setData as any} />
|
|
<pre>{JSON.stringify(data, null, 2)}</pre>
|
|
</div>
|
|
);
|
|
}
|