diff --git a/src/frontend/src/components/floatComponent/index.tsx b/src/frontend/src/components/floatComponent/index.tsx index 278b3d203..40d6fc3fe 100644 --- a/src/frontend/src/components/floatComponent/index.tsx +++ b/src/frontend/src/components/floatComponent/index.tsx @@ -1,5 +1,6 @@ import { useEffect } from "react"; import { FloatComponentType } from "../../types/components"; +import { Input } from "../ui/input"; export default function FloatComponent({ value, @@ -19,8 +20,8 @@ export default function FloatComponent({ }, [disabled, onChange]); return ( -
- + - + { diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index ed563b735..1bda41333 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -1,6 +1,8 @@ import { useEffect } from "react"; import { InputListComponentType } from "../../types/components"; +import { Input } from "../ui/input"; +import { classNames } from "../../utils/utils"; import _ from "lodash"; import IconComponent from "../genericIconComponent"; @@ -17,24 +19,21 @@ export default function InputListComponent({ }, [disabled]); return ( -
+
1 && editNode ? "my-1" : "", + "flex flex-col gap-3" + ) + }> {value.map((i, idx) => { return (
- { let newInputList = _.cloneDeep(value); diff --git a/src/frontend/src/components/intComponent/index.tsx b/src/frontend/src/components/intComponent/index.tsx index 24d28e4f5..c43055b47 100644 --- a/src/frontend/src/components/intComponent/index.tsx +++ b/src/frontend/src/components/intComponent/index.tsx @@ -1,5 +1,6 @@ import { useEffect } from "react"; import { FloatComponentType } from "../../types/components"; +import { Input } from "../ui/input"; export default function IntComponent({ value, @@ -17,13 +18,8 @@ export default function IntComponent({ }, [disabled, onChange]); return ( -
- + { if ( event.key !== "Backspace" && @@ -51,12 +47,8 @@ export default function IntComponent({ } }} value={value ?? ""} - className={ - "nopan nodrag noundo nocopy " + - (editNode - ? " input-edit-node " - : " input-primary " + (disabled ? " input-disable" : "")) - } + className={editNode ? "input-edit-node" : ""} + disabled={disabled} placeholder={editNode ? "Integer number" : "Type an integer number"} onChange={(e) => { onChange(e.target.value); diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index 2bead9a2d..cd598f01e 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -3,6 +3,7 @@ import { TypeModal } from "../../constants/enums"; import GenericModal from "../../modals/genericModal"; import { TextAreaComponentType } from "../../types/components"; import IconComponent from "../genericIconComponent"; +import { Input } from "../ui/input"; export default function TextAreaComponent({ value, @@ -18,42 +19,36 @@ export default function TextAreaComponent({ }, [disabled]); return ( -
-
- + { + onChange(e.target.value); + }} + /> +
+ { - onChange(e.target.value); + setValue={(t: string) => { + onChange(t); }} - /> -
- { - onChange(t); - }} - > - {!editNode && ( - - )} - -
+ > + {!editNode && ( + + )} +
); diff --git a/src/frontend/src/components/ui/input.tsx b/src/frontend/src/components/ui/input.tsx index 0942a3930..c025f8de3 100644 --- a/src/frontend/src/components/ui/input.tsx +++ b/src/frontend/src/components/ui/input.tsx @@ -9,10 +9,7 @@ const Input = React.forwardRef( return ( diff --git a/src/frontend/src/components/ui/textarea.tsx b/src/frontend/src/components/ui/textarea.tsx index 64aec41a1..cfad1cf72 100644 --- a/src/frontend/src/components/ui/textarea.tsx +++ b/src/frontend/src/components/ui/textarea.tsx @@ -8,10 +8,7 @@ const Textarea = React.forwardRef( ({ className, ...props }, ref) => { return (