File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ $buttonPrimary: #54A3FF;
1616.navbar-brand {
1717 svg {width : 120px ;}
1818}
19+
20+ .search-icon {
21+ background : transparent ;
22+ border : none ;
23+ color : #636261 ;
24+ cursor : pointer ;
25+ & :focus {
26+ outline : none ;
27+ }
28+ }
1929.night-mode {
2030 a {
2131 color : #fff !important ;
Original file line number Diff line number Diff line change 11import React from "react"
22export default {
33 text_loading : < i className = "fa fa-spinner fa-pulse" > </ i > ,
4- section_loading : < div className = "p-5" > < i className = "fa fa-spinner fa-pulse" > </ i > Loading...</ div >
4+ section_loading : < div className = "p-5" > < i className = "fa fa-spinner fa-pulse" > </ i > Loading...</ div > ,
5+ search_icon : < i class = "fa fa-search" aria-hidden = "true" > </ i >
56}
Original file line number Diff line number Diff line change 11import React , { useState } from "react" ;
22import { ReactComponent as GitStatsLogo } from '../Images/logo.svg' ;
3+ import Loader from "../Components/Extras/Loader" ;
34
45function Header ( ) {
56 let [ dayStatus , setTheme ] = useState ( true ) ;
@@ -18,7 +19,12 @@ function Header() {
1819 setTheme ( ! dayStatus ) ;
1920 } ;
2021
22+ function search ( ) {
23+ window . location . href = searchString
24+ }
25+
2126 return (
27+
2228 < header >
2329 < div className = "container" >
2430 < nav className = "navbar navbar-expand-lg" >
@@ -48,6 +54,8 @@ function Header() {
4854 value = { searchString }
4955 onChange = { ( event ) => setSearchString ( event . target . value ) }
5056 />
57+ { /* Search icon */ }
58+ < button className = "search-icon" onClick = { search } > { Loader . search_icon } </ button >
5159 </ a >
5260 </ li >
5361 < li >
You can’t perform that action at this time.
0 commit comments