File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ export const NavbarMenu = styled.nav`
55 width: 100%;
66 justify-content: center;
77 align-items: center;
8+ position: sticky;
9+ top: 0;
10+ z-index: 1000;
11+ background-color: ${ ( props ) => props . theme . colors . black } ;
12+ padding-top: ${ ( props ) => props . theme . space [ 2 ] } ;
13+ padding-bottom: ${ ( props ) => props . theme . space [ 2 ] } ;
814
915 @media (max-width: 768px) {
1016 flex-direction: column;
Original file line number Diff line number Diff line change @@ -8,20 +8,15 @@ import {
88 ToggleButton ,
99} from './navbar-styles' ;
1010import { SearchBar } from './search-bar/searchBar' ;
11- import { useLocation } from 'react-router-dom' ;
1211import { useTheme } from '../../../context/themeContext' ;
13- import styled from 'styled-components' ;
1412
15-
16-
17- export type navbarHeaderProps = {
18- onChange : ( ( event : React . ChangeEvent < HTMLInputElement > ) => void ) | undefined ;
13+ interface NavbarHeaderProps {
14+ onChange : ( event : React . ChangeEvent < HTMLInputElement > ) => void ;
1915 value : string ;
20- } ;
16+ }
2117
2218export const NavbarHeader = ( { onChange, value } : navbarHeaderProps ) => {
2319 const { t } = useTranslation ( ) ;
24- const location = useLocation ( ) ;
2520 const { toggleTheme } = useTheme ( ) ;
2621
2722 return (
@@ -48,10 +43,10 @@ export const NavbarHeader = ({ onChange, value }: navbarHeaderProps) => {
4843 { t ( 'my-list' ) }
4944 </ NavItems >
5045 </ NavList >
51- < ToggleButton onClick = { toggleTheme } >
52- Toggle Theme
53- </ ToggleButton >
46+ < ToggleButton onClick = { toggleTheme } > Switch Theme</ ToggleButton >
5447 < SearchBar onChange = { onChange } value = { value } />
5548 </ NavbarMenu >
5649 ) ;
5750} ;
51+
52+
You can’t perform that action at this time.
0 commit comments