Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupK1234 committed Sep 30, 2023
1 parent a2aa965 commit a1a5cdf
Show file tree
Hide file tree
Showing 10 changed files with 532 additions and 143 deletions.
29 changes: 29 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"preview": "vite preview"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.3",
"@popperjs/core": "^2.11.8",
"font-awesome": "^4.7.0",
"framer-motion": "^10.16.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
3 changes: 0 additions & 3 deletions client/src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
body {
background-image: linear-gradient(90deg, #cdffd8, #94b9ff);
}
Binary file removed client/src/assets/Img11.png
Binary file not shown.
Binary file removed client/src/assets/User.jpg
Binary file not shown.
Binary file added client/src/assets/pattern_react.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 109 additions & 0 deletions client/src/components/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import React from "react";
import { Link } from "react-router-dom";
import { createPopper } from "@popperjs/core";

const Dropdown = () => {
// dropdown props
const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false);
const btnDropdownRef = React.createRef();
const popoverDropdownRef = React.createRef();
const openDropdownPopover = () => {
createPopper(btnDropdownRef.current, popoverDropdownRef.current, {
placement: "bottom-start",
});
setDropdownPopoverShow(true);
};
const closeDropdownPopover = () => {
setDropdownPopoverShow(false);
};
return (
<>
<a
className="hover:text-blueGray-500 text-blueGray-700 px-3 py-4 lg:py-2 flex items-center text-xs uppercase font-bold"
href="#pablo"
ref={btnDropdownRef}
onClick={(e) => {
e.preventDefault();
dropdownPopoverShow ? closeDropdownPopover() : openDropdownPopover();
}}
>
Pages
</a>
<div
ref={popoverDropdownRef}
className={
(dropdownPopoverShow ? "block " : "hidden ") +
"bg-white text-base z-50 float-left py-2 list-none text-left rounded shadow-lg min-w-48"
}
>
<span
className={
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400"
}
>
Admin Layout
</span>
<Link
to="/admin/dashboard"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Dashboard
</Link>
<Link
to="/admin/settings"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Settings
</Link>
<Link
to="/admin/tables"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Tables
</Link>
<div className="h-0 mx-4 my-2 border border-solid border-blueGray-100" />
<span
className={
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400"
}
>
Auth Layout
</span>
<Link
to="/auth/login"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Login
</Link>
<Link
to="/auth/register"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Register
</Link>
<div className="h-0 mx-4 my-2 border border-solid border-blueGray-100" />
<span
className={
"text-sm pt-2 pb-0 px-4 font-bold block w-full whitespace-nowrap bg-transparent text-blueGray-400"
}
>
No Layout
</span>
<Link
to="/landing"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Landing
</Link>
<Link
to="/profile"
className="text-sm py-2 px-4 font-normal block w-full whitespace-nowrap bg-transparent text-blueGray-700"
>
Profile
</Link>
</div>
</>
);
};

export default Dropdown;
Loading

0 comments on commit a1a5cdf

Please sign in to comment.