generated from ahandsel/Kintone_Customization_Webpack
-
Notifications
You must be signed in to change notification settings - Fork 11
/
SearchBar.js
32 lines (26 loc) · 965 Bytes
/
SearchBar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SearchBar.js - Search Bar component - Creates the search bar input
// Accepts a “props” (i.e. properties) object passed from parent component
// Returns a React element
// visually-hidden label is for accessibility purpose: screen reader sees it while others don't
// ImSearch is an icon stored in the react-icons/im library
import { ImSearch as SearchIcon } from "react-icons/im";
export default function SearchBar(props) {
return (
<div className='Search'>
<form action='/' method='get'>
<label htmlFor='header-search'>
<span className='visually-hidden'>Search Manga Titles</span>
</label>
<input
className=''
type='text'
id='header-search'
placeholder='Search Manga Titles'
name='Search Bar for Manga Titles'
onChange={}
/>
<button className="SearchButton" type='button'><SearchIcon /></button>
</form>
</div>
);
};