Skip to content

Commit

Permalink
Make profile navbar and search bar reusable
Browse files Browse the repository at this point in the history
  • Loading branch information
chauhanshilpa committed May 17, 2024
1 parent 898666f commit cc9b55c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
26 changes: 21 additions & 5 deletions app/components/profile_components/ProfileNavbar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
import React from 'react'
import React from "react";
import SearchBar from "../reusable/SearchBar";
import { IoMdHome, IoIosNotifications } from "react-icons/io";
import { BiSolidMessageRounded } from "react-icons/bi";
import Image from "next/image";

const Navbar = () => {
return (
<div>
I am navbar for profile
<div className="flex justify-between mt-2 mb-8">
<SearchBar placeholder="Enter interests" />
<div className="flex gap-10 items-center">
<IoMdHome className="text-2xl" />
<BiSolidMessageRounded className="text-2xl" />
<IoIosNotifications className="text-2xl" />
<Image
src="/profile-image.png"
height={35}
width={35}
alt="profile-image"
className="rounded-full"
/>
</div>
</div>
)
}
);
};

export default Navbar;
4 changes: 2 additions & 2 deletions app/components/reusable/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

const SearchBar = () => {
const SearchBar = ({placeholder}: {placeholder: string}) => {
return (
<form className="min-w-[50%] text-center">
<label
Expand Down Expand Up @@ -31,7 +31,7 @@ const SearchBar = () => {
type="search"
id="default-search"
className="block w-full p-2 ps-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
placeholder="Find new friends, chat, and discover communities"
placeholder={placeholder}
required
/>
{/* <button
Expand Down

0 comments on commit cc9b55c

Please sign in to comment.