Last active
May 17, 2020 11:07
-
-
Save Dromediansk/8bc20621bbf8cd160b004ffcfb8ebbdb to your computer and use it in GitHub Desktop.
Form with inputs example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import "./AdvancedFilter.css"; | |
| const AdvancedFilter = ({ searchValue, handleChangeValue }) => ( | |
| <form className="filter-container"> | |
| <input | |
| data-testid="filter-input-name" | |
| type="text" | |
| name="name" | |
| value={searchValue.name} | |
| onChange={(e) => handleChangeValue(e)} | |
| placeholder="country" | |
| className="filter-input" | |
| autoFocus | |
| /> | |
| <input | |
| data-testid="filter-input-capital" | |
| type="text" | |
| name="capital" | |
| value={searchValue.capital} | |
| onChange={(e) => handleChangeValue(e)} | |
| placeholder="capital" | |
| className="filter-input" | |
| /> | |
| <input | |
| data-testid="filter-input-population" | |
| type="number" | |
| min="0" | |
| name="population" | |
| className="filter-input" | |
| placeholder="population" | |
| value={searchValue.population} | |
| onChange={(e) => handleChangeValue(e)} | |
| /> | |
| </form> | |
| ); | |
| export default AdvancedFilter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment