diff --git a/frontend/src/components/Common/Navbar.tsx b/frontend/src/components/Common/Navbar.tsx index edcb3d0..db7bb06 100644 --- a/frontend/src/components/Common/Navbar.tsx +++ b/frontend/src/components/Common/Navbar.tsx @@ -1,27 +1,46 @@ -import { Button, Flex, Icon, useDisclosure } from "@chakra-ui/react" -import { FaPlus } from "react-icons/fa" +import { + Button, + Flex, + Icon, + Input, + InputGroup, + InputLeftElement, + useDisclosure, +} from "@chakra-ui/react" +import { FaPlus, FaSearch } from "react-icons/fa" import AddUser from "../Admin/AddUser" import AddItem from "../Items/AddItem" interface NavbarProps { type: string + searchValue?: string + onSearchChange?: (value: string) => void } -const Navbar = ({ type }: NavbarProps) => { +const Navbar = ({ type, searchValue, onSearchChange }: NavbarProps) => { const addUserModal = useDisclosure() const addItemModal = useDisclosure() + const isSearchable = onSearchChange !== undefined return ( <> - {/* TODO: Complete search functionality */} - {/* - - - - - */} + {isSearchable && ( + + + + + onSearchChange(event.target.value)} + fontSize={{ base: "sm", md: "inherit" }} + borderRadius="8px" + /> + + )}