Skip to content

Commit 8f67c3a

Browse files
committed
Implement the new styling of the searchbar.
1 parent 63979aa commit 8f67c3a

File tree

1 file changed

+18
-7
lines changed
  • netflix-create-react-vite-app/src/components/navbarmenu/navbarheader/search-bar

1 file changed

+18
-7
lines changed
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import React from 'react';
22
import { useTranslation } from 'react-i18next';
3-
import { NavbarInput, NavbarSearch } from './searchbar.styles';
3+
import { SearchIcon } from './search-icon';
4+
import {
5+
NavbarInput,
6+
NavbarSearch,
7+
SearchContainer,
8+
SearchIconWrapper,
9+
} from './searchbar.styles';
410

511
export type searchProps = {
612
onChange: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
@@ -11,12 +17,17 @@ export const SearchBar = ({ value, onChange }: searchProps) => {
1117
const { t } = useTranslation();
1218
return (
1319
<NavbarSearch>
14-
<NavbarInput
15-
onChange={onChange}
16-
placeholder={t('search-title')}
17-
type="search"
18-
value={value}
19-
/>
20+
<SearchContainer>
21+
<SearchIconWrapper>
22+
<SearchIcon />
23+
</SearchIconWrapper>
24+
<NavbarInput
25+
onChange={onChange}
26+
placeholder={t('search-title')}
27+
type="search"
28+
value={value}
29+
/>
30+
</SearchContainer>
2031
</NavbarSearch>
2132
);
2233
};

0 commit comments

Comments
 (0)