FIxed gap in modal and errors not displaying at CodeAreaModal

This commit is contained in:
Lucas Oliveira 2023-07-17 10:19:13 -03:00
commit 9788ca6c2e
2 changed files with 22 additions and 4 deletions

View file

@ -105,8 +105,9 @@ function BaseModal({
<DialogContent className={minWidth}> <DialogContent className={minWidth}>
{headerChild} {headerChild}
<div className={`mt-2 flex ${height} w-full `}>{ContentChild}</div> <div className={`mt-2 flex ${height} w-full `}>{ContentChild}</div>
{ContentFooter && (
<div className="flex flex-row-reverse">{ContentFooter}</div> <div className="flex flex-row-reverse">{ContentFooter}</div>
)}
</DialogContent> </DialogContent>
</Dialog> </Dialog>
); );

View file

@ -148,9 +148,26 @@ export default function CodeAreaModal({
onChange={(value) => { onChange={(value) => {
setCode(value); setCode(value);
}} }}
className="h-full w-full rounded-lg border-[1px] border-border custom-scroll" className="h-full w-full rounded-lg border-[1px] border-gray-300 custom-scroll dark:border-gray-600"
/> />
</div> </div>
<div
className={
"w-full transition-all delay-500 " +
(error?.detail.error !== undefined ? "h-2/6" : "h-0")
}
>
<div className="mt-1 h-full w-full overflow-y-auto overflow-x-clip text-left custom-scroll">
<h1 className="text-lg text-destructive">
{error?.detail?.error}
</h1>
<div className="ml-2 w-full break-all text-sm text-status-red">
<pre className="w-full whitespace-pre-wrap break-all">
{error?.detail?.traceback}
</pre>
</div>
</div>
</div>
<div className="flex h-fit w-full justify-end"> <div className="flex h-fit w-full justify-end">
<Button className="mt-3" onClick={handleClick} type="submit"> <Button className="mt-3" onClick={handleClick} type="submit">
Check & Save Check & Save