Download Netflix-Clone/src/Components/FormInput/FormInput.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/FormInput/FormInput.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/FormInput/FormInput.js
-
curl -L -o FormInput.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/FormInput/FormInput.js
507 Bytes
| 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; | |