mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
added a simple mcp ui in tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { JSONSchema } from "json-schema-to-ts";
|
||||
import { useBknd } from "ui/client/bknd";
|
||||
import { Button } from "ui/components/buttons/Button";
|
||||
import { s } from "bknd/utils";
|
||||
import {
|
||||
AnyOf,
|
||||
AnyOfField,
|
||||
@@ -73,7 +74,31 @@ export default function JsonSchemaForm3() {
|
||||
return (
|
||||
<Scrollable>
|
||||
<div className="flex flex-col p-3">
|
||||
<Form schema={_schema.auth.toJSON()} options={formOptions} />
|
||||
{/* <Form schema={_schema.auth.toJSON()} options={formOptions} /> */}
|
||||
|
||||
<Form
|
||||
options={{
|
||||
anyOfNoneSelectedMode: "first",
|
||||
debug: true,
|
||||
}}
|
||||
initialValues={{ isd: "1", nested2: { name: "hello" } }}
|
||||
schema={s
|
||||
.object({
|
||||
isd: s
|
||||
.anyOf([s.string({ title: "String" }), s.number({ title: "Number" })])
|
||||
.optional(),
|
||||
email: s.string({ format: "email" }).optional(),
|
||||
nested: s
|
||||
.object({
|
||||
name: s.string(),
|
||||
})
|
||||
.optional(),
|
||||
nested2: s
|
||||
.anyOf([s.object({ name: s.string() }), s.object({ age: s.number() })])
|
||||
.optional(),
|
||||
})
|
||||
.toJSON()}
|
||||
/>
|
||||
|
||||
{/*<Form
|
||||
onChange={(data) => console.log("change", data)}
|
||||
|
||||
Reference in New Issue
Block a user