mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-19 05:46:04 +00:00
added new settings UI for auth
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { type ModalProps, Tabs } from "@mantine/core";
|
||||
import type { ContextModalProps } from "@mantine/modals";
|
||||
import clsx from "clsx";
|
||||
import { transformObject } from "core/utils";
|
||||
import type { ComponentProps } from "react";
|
||||
import { JsonViewer } from "../../components/code/JsonViewer";
|
||||
@@ -29,8 +30,8 @@ export function DebugModal({ innerProps }: ContextModalProps<DebugProps>) {
|
||||
});
|
||||
|
||||
const count = Object.keys(tabs).length;
|
||||
function renderTab({ value, label, ...props }: (typeof tabs)[keyof typeof tabs]) {
|
||||
return <JsonViewer json={value as any} {...props} />;
|
||||
function renderTab({ value, label, className, ...props }: (typeof tabs)[keyof typeof tabs]) {
|
||||
return <JsonViewer json={value as any} className={clsx("text-sm", className)} {...props} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -61,7 +61,7 @@ export function SchemaFormModal({
|
||||
return (
|
||||
<>
|
||||
{error && <Alert.Exception message={error} />}
|
||||
<div className="pt-3 pb-3 px-3 gap-4 flex flex-col">
|
||||
<div className="pt-3 pb-3 px-4 gap-4 flex flex-col">
|
||||
<JsonSchemaForm
|
||||
tagName="form"
|
||||
ref={formRef}
|
||||
@@ -84,10 +84,10 @@ export function SchemaFormModal({
|
||||
|
||||
SchemaFormModal.defaultTitle = "JSON Schema Form Modal";
|
||||
SchemaFormModal.modalProps = {
|
||||
size: "md",
|
||||
classNames: {
|
||||
size: "md",
|
||||
root: "bknd-admin",
|
||||
header: "!bg-primary/5 border-b border-b-muted !py-3 px-5 !h-auto !min-h-px",
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user