From e606762e7f18c205b6d92f29952376e65bdab6a0 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 26 Jan 2024 19:51:27 +0100 Subject: [PATCH] UI design of button and repeat function --- .../src/CustomNodes/GenericNode/index.tsx | 38 ++-- .../newChatView/chatInput/index.tsx | 174 ++++++++++-------- src/frontend/src/style/applies.css | 14 +- src/frontend/src/utils/styleUtils.ts | 2 + 4 files changed, 124 insertions(+), 104 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 4f065e8a4..e5b128f56 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -4,6 +4,7 @@ import ShadTooltip from "../../components/ShadTooltipComponent"; import Tooltip from "../../components/TooltipComponent"; import IconComponent from "../../components/genericIconComponent"; import InputComponent from "../../components/inputComponent"; +import { Button } from "../../components/ui/button"; import { Textarea } from "../../components/ui/textarea"; import { priorityFields } from "../../constants/constants"; import NodeToolbarComponent from "../../pages/FlowPage/components/nodeToolbarComponent"; @@ -320,8 +321,9 @@ export default function GenericNode({ )} {showNode && ( -
{ setNode(data.id, (old) => ({ ...old, @@ -346,11 +348,12 @@ export default function GenericNode({ />
- + )} {showNode && ( -
buildFlow(data.id)} >
@@ -363,7 +366,7 @@ export default function GenericNode({ Build{" "} {" "} flow to validate status. @@ -381,34 +384,37 @@ export default function GenericNode({ } >
-
-
+
-
+
+ />
-
+ )} diff --git a/src/frontend/src/components/newChatView/chatInput/index.tsx b/src/frontend/src/components/newChatView/chatInput/index.tsx index 2a4d39f4b..777fb5d79 100644 --- a/src/frontend/src/components/newChatView/chatInput/index.tsx +++ b/src/frontend/src/components/newChatView/chatInput/index.tsx @@ -3,6 +3,9 @@ import IconComponent from "../../../components/genericIconComponent"; import { Textarea } from "../../../components/ui/textarea"; import { chatInputType } from "../../../types/components"; import { classNames } from "../../../utils/utils"; +import { Button } from "../../ui/button"; +import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover"; +import { Input } from "../../ui/input"; export default function ChatInput({ lockChat, @@ -12,7 +15,7 @@ export default function ChatInput({ inputRef, noInput, }: chatInputType): JSX.Element { - const [repeate, setRepeate] = useState(1); + const [repeat, setRepeat] = useState(1); useEffect(() => { if (!lockChat && inputRef.current) { inputRef.current.focus(); @@ -22,9 +25,9 @@ export default function ChatInput({ function handleChange(value: number) { console.log(value); if (value > 0) { - setRepeate(value); + setRepeat(value); } else { - setRepeate(1); + setRepeat(1); } } @@ -36,90 +39,99 @@ export default function ChatInput({ }, [chatValue]); return ( -
-
- repeate - +
+