fix diagrams sizes

This commit is contained in:
Guy Ben-Aharon
2024-08-23 22:50:21 +03:00
parent 7ec8783fb3
commit 242a1089e6
2 changed files with 24 additions and 17 deletions

View File

@@ -260,13 +260,13 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
<div></div>
)}
{/* <DialogClose asChild> */}
<div className="flex gap-2">
<div className="flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2">
<Button
type="button"
variant="outline"
onClick={createNewDiagram}
>
Skip
Create empty diagram
</Button>
<Button
type="button"
@@ -288,24 +288,28 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
return (
<DialogFooter className="flex !justify-between gap-2">
{/* <DialogClose asChild> */}
<Button
type="button"
variant="secondary"
onClick={() =>
setStep(CreateDiagramDialogStep.SELECT_DATABASE)
}
>
Back
</Button>
<div className="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
<Button
type="button"
variant="secondary"
onClick={() =>
setStep(
CreateDiagramDialogStep.SELECT_DATABASE
)
}
>
Back
</Button>
</div>
{/* </DialogClose> */}
<div className="flex gap-2">
<div className="flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2">
<DialogClose asChild>
<Button
type="button"
variant="secondary"
variant="outline"
onClick={createNewDiagram}
>
Skip this step
Create empty diagram
</Button>
</DialogClose>
<DialogClose asChild>
@@ -318,7 +322,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
}
onClick={createNewDiagram}
>
Finish
Import
</Button>
</DialogClose>
</div>

View File

@@ -85,14 +85,17 @@ export const ExportSQLDialog: React.FC<ExportSQLDialogProps> = ({
<DialogHeader>
<DialogTitle>Export SQL</DialogTitle>
<DialogDescription>
Export the SQL of the current diagram
Export your diagram schema as SQL script
</DialogDescription>
</DialogHeader>
<div className="flex flex-1 items-center justify-center">
{(script?.length ?? 0) === 0 ? (
renderLoader()
) : (
<CodeSnippet code={script!} />
<CodeSnippet
className="max-h-96 w-full"
code={script!}
/>
)}
</div>