mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
admin ui: made context overlays scrollable
This commit is contained in:
@@ -378,11 +378,7 @@ function replaceEntitiesEnum(schema: Record<string, any>, entities: string[]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const Policy = ({
|
const Policy = ({ permission }: { permission: TPermission }) => {
|
||||||
permission,
|
|
||||||
}: {
|
|
||||||
permission: TPermission;
|
|
||||||
}) => {
|
|
||||||
const { value } = useDerivedFieldContext("", ({ value }) => ({
|
const { value } = useDerivedFieldContext("", ({ value }) => ({
|
||||||
effect: (value?.effect ?? "allow") as "allow" | "deny" | "filter",
|
effect: (value?.effect ?? "allow") as "allow" | "deny" | "filter",
|
||||||
}));
|
}));
|
||||||
@@ -503,22 +499,24 @@ const CustomFieldWrapper = ({
|
|||||||
className: "max-w-none",
|
className: "max-w-none",
|
||||||
}}
|
}}
|
||||||
position="bottom-end"
|
position="bottom-end"
|
||||||
target={() =>
|
target={() => (
|
||||||
typeof schema.content === "object" ? (
|
<div className="w-auto max-w-[80vw] md:max-w-120 bg-background overflow-scroll">
|
||||||
<JsonViewer
|
{typeof schema.content === "object" ? (
|
||||||
className="w-auto max-w-120 bg-background pr-3 text-sm"
|
<JsonViewer
|
||||||
json={schema.content}
|
className="pr-3 text-sm"
|
||||||
title={schema.name}
|
json={schema.content}
|
||||||
expand={5}
|
title={schema.name}
|
||||||
/>
|
expand={5}
|
||||||
) : (
|
/>
|
||||||
<CodePreview
|
) : (
|
||||||
code={schema.content}
|
<CodePreview
|
||||||
lang="typescript"
|
code={schema.content}
|
||||||
className="w-auto max-w-120 bg-background p-3 text-sm"
|
lang="typescript"
|
||||||
/>
|
className="p-3 text-sm"
|
||||||
)
|
/>
|
||||||
}
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Button variant="ghost" size="smaller" IconLeft={TbCodeDots}>
|
<Button variant="ghost" size="smaller" IconLeft={TbCodeDots}>
|
||||||
{autoFormatString(schema.name)}
|
{autoFormatString(schema.name)}
|
||||||
|
|||||||
Reference in New Issue
Block a user