You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import React from "react";
|
|
|
|
import Input from "./Input";
|
|
|
|
|
|
|
|
export default function FormInput({ type, name, onChange, value, label, className, error, autoComplete, autoFocus, placeholder, disabled, readOnly, min = null }) {
|
|
|
|
return (
|
|
|
|
<div className={className}>
|
|
|
|
<label htmlFor="first_name" className="block mb-2 text-sm font-medium text-gray-900 dark:text-white">{label}</label>
|
|
|
|
<Input
|
|
|
|
type={type}
|
|
|
|
name={name}
|
|
|
|
onChange={onChange}
|
|
|
|
value={value}
|
|
|
|
error={error}
|
|
|
|
autoComplete={autoComplete}
|
|
|
|
autoFocus={autoFocus}
|
|
|
|
placeholder={placeholder}
|
|
|
|
disabled={disabled}
|
|
|
|
readOnly={readOnly}
|
|
|
|
min={min}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|