mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
26 lines
843 B
TypeScript
26 lines
843 B
TypeScript
import { AppFlows } from "flows/AppFlows";
|
|
import { useState } from "react";
|
|
import { JsonViewer } from "../../../components/code/JsonViewer";
|
|
import { JsonSchemaForm } from "../../../components/form/json-schema";
|
|
import { Scrollable } from "../../../layouts/AppShell/AppShell";
|
|
import { parse } from "core/object/schema";
|
|
|
|
export default function FlowCreateSchemaTest() {
|
|
//const schema = flowsConfigSchema;
|
|
const schema = new AppFlows().getSchema();
|
|
const [data, setData] = useState(parse(schema, {}));
|
|
|
|
return (
|
|
<Scrollable>
|
|
<div className="flex flex-col p-3">
|
|
<JsonSchemaForm
|
|
schema={schema}
|
|
onChange={setData}
|
|
className="legacy hide-required-mark"
|
|
/>
|
|
</div>
|
|
<JsonViewer json={data} expand={9} />
|
|
</Scrollable>
|
|
);
|
|
}
|