Enhance MachineMechanics and InputWithDropDown components; add connections to path interfaces

This commit is contained in:
2025-03-27 12:24:15 +05:30
parent 6b92b6c235
commit 2dfd34f27b
8 changed files with 32 additions and 25 deletions

View File

@@ -4,6 +4,8 @@ import RenameInput from "./RenameInput";
type InputWithDropDownProps = {
label: string;
value: string;
min?: number
defaultValue?: string;
options?: string[]; // Array of dropdown options
activeOption?: string; // The currently active dropdown option
onClick?: () => void;
@@ -15,6 +17,8 @@ type InputWithDropDownProps = {
const InputWithDropDown: React.FC<InputWithDropDownProps> = ({
label,
value,
min,
defaultValue,
options,
activeOption,
onClick,
@@ -40,8 +44,9 @@ const InputWithDropDown: React.FC<InputWithDropDownProps> = ({
)}
<div className="input default" id={separatedWords}>
<input
min={min}
type="number"
// defaultValue={value}
defaultValue={value}
onChange={(e) => {
onChange(e.target.value);
}}