File size: 507 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import React from "react";
import "./FormInput.scss";
const FormInput = ({ handleChange, label, ...otherProps }) => {
return (
<div className="group">
<input className="form-input" onChange={handleChange} {...otherProps} />
{label ? (
<label
className={`${
otherProps.value.length ? "shrink" : ""
} form-input-label`}
>
{label}
</label>
) : null}
</div>
);
};
export default FormInput;
|