You've already forked factorio-server-manager
mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-12-26 00:42:03 +02:00
33 lines
931 B
JavaScript
33 lines
931 B
JavaScript
import React from "react";
|
|
|
|
const Input = ({
|
|
register,
|
|
placeholder = undefined,
|
|
type = "text",
|
|
defaultValue = undefined,
|
|
hasAutoComplete = true,
|
|
onKeyDown = () => undefined,
|
|
min = undefined,
|
|
max = undefined,
|
|
value = undefined,
|
|
disabled = false
|
|
}) => {
|
|
return (
|
|
<input
|
|
className="shadow appearance-none border w-full py-2 px-3 text-black"
|
|
placeholder={placeholder}
|
|
{...register}
|
|
type={type}
|
|
onKeyDown={onKeyDown}
|
|
autoComplete={hasAutoComplete ? "on" : "off"}
|
|
defaultValue={defaultValue}
|
|
min={min}
|
|
max={max}
|
|
value={value}
|
|
disabled={disabled}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default Input;
|