Enhance MachineMechanics and InputWithDropDown components; add connections to path interfaces
This commit is contained in:
@@ -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);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user