({ children })
| 7 | }; |
| 8 | |
| 9 | export const SearchForm: FC<Props> = ({ children }) => { |
| 10 | const [query, setQuery] = useState(''); |
| 11 | |
| 12 | return ( |
| 13 | <> |
| 14 | <div className={styles.container}> |
| 15 | <input |
| 16 | className={styles.input} |
| 17 | name="search" |
| 18 | type="text" |
| 19 | value={query} |
| 20 | onChange={(e) => setQuery(e.target.value)} |
| 21 | placeholder="Search component" |
| 22 | /> |
| 23 | <SearchIcon size={16} /> |
| 24 | </div> |
| 25 | {children(query)} |
| 26 | </> |
| 27 | ); |
| 28 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected