From 20b7b6acd6b44e5e91aef0a2d08843a613d72ac9 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 19 Jun 2024 15:37:46 -0300 Subject: [PATCH] Fixed buttons on nodes being draggable --- .../src/components/promptComponent/index.tsx | 45 ++++++++++--------- .../components/textAreaComponent/index.tsx | 21 +++++---- .../src/modals/genericModal/index.tsx | 2 +- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/frontend/src/components/promptComponent/index.tsx b/src/frontend/src/components/promptComponent/index.tsx index a4c1f9225..0dcec3dbf 100644 --- a/src/frontend/src/components/promptComponent/index.tsx +++ b/src/frontend/src/components/promptComponent/index.tsx @@ -4,6 +4,7 @@ import { TypeModal } from "../../constants/enums"; import GenericModal from "../../modals/genericModal"; import { PromptAreaComponentType } from "../../types/components"; import IconComponent from "../genericIconComponent"; +import { Button } from "../ui/button"; export default function PromptAreaComponent({ field_name, @@ -36,30 +37,32 @@ export default function PromptAreaComponent({ nodeClass={nodeClass} setNodeClass={setNodeClass} > -
- - {value !== "" ? value : "Type your prompt here..."} - - {!editNode && ( - +
+ - )} -
+ > + {value !== "" ? value : "Type your prompt here..."} + + {!editNode && ( + + )} +
+ ); diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index 964148c7d..ce42437d7 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -4,6 +4,7 @@ import { TypeModal } from "../../constants/enums"; import GenericModal from "../../modals/genericModal"; import { TextAreaComponentType } from "../../types/components"; import IconComponent from "../genericIconComponent"; +import { Button } from "../ui/button"; import { Input } from "../ui/input"; export default function TextAreaComponent({ @@ -46,15 +47,17 @@ export default function TextAreaComponent({ disabled={disabled} > {!editNode && ( - + )} diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index ae9c5bab3..3ed4379bc 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -188,7 +188,7 @@ export default function GenericModal({ open={modalOpen} setOpen={setModalOpen} > - {children} + {children} { switch (myModalTitle) {