mirror of
https://github.com/mosh-hamedani/game-hub.git
synced 2026-05-21 12:14:32 +02:00
Build search input
This commit is contained in:
parent
c64514a5a6
commit
7c572a4560
|
|
@ -6,7 +6,7 @@ const ColorModeSwitch = () => {
|
|||
return (
|
||||
<HStack>
|
||||
<Switch colorScheme='green' isChecked={colorMode === 'dark'} onChange={toggleColorMode} />
|
||||
<Text>Dark Mode</Text>
|
||||
<Text whiteSpace='nowrap'>Dark Mode</Text>
|
||||
</HStack>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import { HStack, Image } from '@chakra-ui/react'
|
||||
import logo from '../assets/logo.webp';
|
||||
import ColorModeSwitch from './ColorModeSwitch';
|
||||
import SearchInput from './SearchInput';
|
||||
|
||||
const NavBar = () => {
|
||||
return (
|
||||
<HStack justifyContent='space-between' padding='10px'>
|
||||
<HStack padding='10px'>
|
||||
<Image src={logo} boxSize='60px' />
|
||||
<SearchInput />
|
||||
<ColorModeSwitch />
|
||||
</HStack>
|
||||
)
|
||||
|
|
|
|||
13
src/components/SearchInput.tsx
Normal file
13
src/components/SearchInput.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Input, InputGroup, InputLeftElement } from "@chakra-ui/react";
|
||||
import { BsSearch } from "react-icons/bs";
|
||||
|
||||
const SearchInput = () => {
|
||||
return (
|
||||
<InputGroup>
|
||||
<InputLeftElement children={<BsSearch />} />
|
||||
<Input borderRadius={20} placeholder="Search games..." variant="filled" />
|
||||
</InputGroup>
|
||||
);
|
||||
};
|
||||
|
||||
export default SearchInput;
|
||||
Loading…
Reference in a new issue