fix code box on APIMdal
This commit is contained in:
parent
429cf52c63
commit
04cf77ffd6
2 changed files with 6 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ import {
|
||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
} from "../../components/ui/dialog";
|
} from "../../components/ui/dialog";
|
||||||
import { Button } from "../../components/ui/button";
|
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 { getCurlCode, getPythonApiCode, getPythonCode } from "../../constants";
|
||||||
import { EXPORT_CODE_DIALOG } from "../../constants";
|
import { EXPORT_CODE_DIALOG } from "../../constants";
|
||||||
|
|
||||||
|
|
@ -96,8 +96,8 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
|
||||||
<DialogDescription>{EXPORT_CODE_DIALOG}</DialogDescription>
|
<DialogDescription>{EXPORT_CODE_DIALOG}</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div className="flex flex-col h-full w-full ">
|
<div className="flex flex-col h-full w-full overflow-hidden">
|
||||||
<div className="flex px-5 z-10">
|
<div className="flex px-5 z-10 w-full">
|
||||||
{tabs.map((tab, index) => (
|
{tabs.map((tab, index) => (
|
||||||
<button
|
<button
|
||||||
key={index}
|
key={index}
|
||||||
|
|
@ -117,7 +117,7 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
|
||||||
))}
|
))}
|
||||||
</div>
|
</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=" 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">
|
<div className="float-right">
|
||||||
<button
|
<button
|
||||||
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-gray-500 dark:text-gray-300"
|
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>
|
||||||
</div>
|
</div>
|
||||||
<SyntaxHighlighter
|
<SyntaxHighlighter
|
||||||
className="h-[350px] w-full"
|
className="h-[350px] w-full overflow-auto"
|
||||||
language={tabs[activeTab].mode}
|
language={tabs[activeTab].mode}
|
||||||
style={oneDark}
|
style={oneDark}
|
||||||
customStyle={{ margin: 0 }}
|
customStyle={{ margin: 0 }}
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
||||||
)
|
)
|
||||||
.map((n, i) => (
|
.map((n, i) => (
|
||||||
<TableRow key={i} className="h-10 dark:border-b-muted">
|
<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].name
|
? data.node.template[n].name
|
||||||
: data.node.template[n].display_name}
|
: data.node.template[n].display_name}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue