diff --git a/frontend/src/components/Common/Navbar.tsx b/frontend/src/components/Common/Navbar.tsx index edcb3d0..55d5c90 100644 --- a/frontend/src/components/Common/Navbar.tsx +++ b/frontend/src/components/Common/Navbar.tsx @@ -1,27 +1,45 @@ -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() return ( <> - {/* TODO: Complete search functionality */} - {/* - - - - - */} + {onSearchChange && ( + + + + + onSearchChange(event.target.value)} + /> + + )}