-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#15): create & implement SearchBox component
- Loading branch information
1 parent
819d1bb
commit d50a770
Showing
7 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, {Fragment} from 'react'; | ||
import {ReactComponent as Search} from "../../assets/Search.svg"; | ||
|
||
const SearchBox = ({placeholder, handleChange, pt, px}) => { | ||
return <Fragment> | ||
<form id="search" | ||
className={`grid--cell fl-grow1 searchbar ${pt} ${px} js-searchbar`} autoComplete="off"> | ||
<div className="ps-relative search-frame"> | ||
<input | ||
className="s-input s-input__search h100 search-box" | ||
autoComplete="off" | ||
type="text" | ||
maxLength="35" | ||
placeholder={placeholder} | ||
onChange= {handleChange} | ||
/> | ||
<Search/> | ||
</div> | ||
</form> | ||
</Fragment> | ||
} | ||
|
||
export default SearchBox; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.search-frame { | ||
width: 220px; | ||
//float: right; | ||
} | ||
|
||
.search-box:focus { | ||
border-color: #2b5f8a; | ||
box-shadow: 0 0 0 4px #378ad326; | ||
color: #fff; | ||
outline: 0; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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