21 lines
420 B
JavaScript
21 lines
420 B
JavaScript
|
|
const Input = ({ label, type = 'text', placeholder, id, ...props }) => {
|
|
return (
|
|
<div className="form-group">
|
|
<div className="form-group">
|
|
{label && <label htmlFor={id}>{label}</label>}
|
|
|
|
<input
|
|
type={type}
|
|
id={id}
|
|
placeholder={placeholder}
|
|
className="form-input"
|
|
{...props}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Input;
|