mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 00:26:01 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -3,7 +3,7 @@ import { Button } from "ui/components/buttons/Button";
|
||||
import {
|
||||
JsonSchemaForm,
|
||||
type JsonSchemaFormProps,
|
||||
type JsonSchemaFormRef
|
||||
type JsonSchemaFormRef,
|
||||
} from "ui/components/form/json-schema";
|
||||
|
||||
import type { ContextModalProps } from "@mantine/modals";
|
||||
@@ -15,14 +15,14 @@ type Props = JsonSchemaFormProps & {
|
||||
data: any,
|
||||
context: {
|
||||
close: () => void;
|
||||
}
|
||||
},
|
||||
) => void | Promise<void>;
|
||||
};
|
||||
|
||||
export function SchemaFormModal({
|
||||
context,
|
||||
id,
|
||||
innerProps: { schema, uiSchema, onSubmit, autoCloseAfterSubmit }
|
||||
innerProps: { schema, uiSchema, onSubmit, autoCloseAfterSubmit },
|
||||
}: ContextModalProps<Props>) {
|
||||
const [valid, setValid] = useState(false);
|
||||
const formRef = useRef<JsonSchemaFormRef>(null);
|
||||
@@ -49,7 +49,7 @@ export function SchemaFormModal({
|
||||
setSubmitting(true);
|
||||
await onSubmit?.(formRef.current?.formData(), {
|
||||
close: handleClose,
|
||||
setError
|
||||
setError,
|
||||
});
|
||||
setSubmitting(false);
|
||||
|
||||
@@ -90,6 +90,6 @@ SchemaFormModal.modalProps = {
|
||||
header: "!bg-lightest !py-3 px-5 !h-auto !min-h-px",
|
||||
content: "rounded-lg select-none",
|
||||
title: "!font-bold !text-md",
|
||||
body: "!p-0"
|
||||
}
|
||||
body: "!p-0",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user