fix code box on APIMdal

This commit is contained in:
anovazzi1 2023-06-14 17:34:39 -03:00
commit 04cf77ffd6
2 changed files with 6 additions and 6 deletions

View file

@ -24,7 +24,7 @@ import {
DialogTrigger,
} from "../../components/ui/dialog";
import { Button } from "../../components/ui/button";
import { FlowType } from "src/types/flow";
import { FlowType } from "../../types/flow/index";
import { getCurlCode, getPythonApiCode, getPythonCode } from "../../constants";
import { EXPORT_CODE_DIALOG } from "../../constants";
@ -96,8 +96,8 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
<DialogDescription>{EXPORT_CODE_DIALOG}</DialogDescription>
</DialogHeader>
<div className="flex flex-col h-full w-full ">
<div className="flex px-5 z-10">
<div className="flex flex-col h-full w-full overflow-hidden">
<div className="flex px-5 z-10 w-full">
{tabs.map((tab, index) => (
<button
key={index}
@ -117,7 +117,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
))}
</div>
<div className=" overflow-hidden px-4 sm:p-4 sm:pb-0 sm:pt-0 w-full h-full rounded-lg border-gray-200 border-[1px] bg-muted dark:bg-gray-800">
<div className="items-center mb-2">
<div className="items-center mb-2 w-full">
<div className="float-right">
<button
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-gray-500 dark:text-gray-300"
@ -133,7 +133,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
</div>
</div>
<SyntaxHighlighter
className="h-[350px] w-full"
className="h-[350px] w-full overflow-auto"
language={tabs[activeTab].mode}
style={oneDark}
customStyle={{ margin: 0 }}

View file

@ -139,7 +139,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
)
.map((n, i) => (
<TableRow key={i} className="h-10 dark:border-b-muted">
<TableCell className="p-0 text-center text-gray-900 text-xs dark:text-gray-300 text-sm">
<TableCell className="p-0 text-center text-gray-900 dark:text-gray-300 text-sm">
{data.node.template[n].name
? data.node.template[n].name
: data.node.template[n].display_name}