feat add input components

This commit is contained in:
ali josheghani
2024-05-30 16:16:45 +03:30
parent 9cdc8f8782
commit bebc99f264

View File

@@ -0,0 +1,29 @@
import { InputProps } from "../../types/props";
const Input = ({
label,
id,
type,
name,
placeholder,
extra,
...attrs
}: InputProps) => {
return (
<div>
<label htmlFor={id} className="block mb-2 text-sm font-medium text-white">
{label}
</label>
<input
type={type}
name={name}
id={id}
className="outline-none border-none sm:text-sm rounded-lg block w-full p-2.5 md:p-3 bg-gray-700 border-gray-600 placeholder-gray-400 text-white"
placeholder={placeholder}
{...attrs}
/>
</div>
);
};
export default Input;