Frontend Renewal
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
Typography,
|
||||
} from "@material-tailwind/react";
|
||||
import { useMaterialTailwindController, setOpenSidenav } from "@/components";
|
||||
import logo from "@/assets/images/stackpulse.png";
|
||||
|
||||
export function Sidenav({ brandImg, brandName, routes }) {
|
||||
const [controller, dispatch] = useMaterialTailwindController();
|
||||
@@ -20,30 +21,20 @@ export function Sidenav({ brandImg, brandName, routes }) {
|
||||
|
||||
return (
|
||||
<aside
|
||||
className={`${sidenavTypes[sidenavType]} ${
|
||||
openSidenav ? "translate-x-0" : "-translate-x-80"
|
||||
} fixed inset-0 z-50 my-4 ml-4 h-[calc(100vh-32px)] w-72 rounded-xl transition-transform duration-300 xl:translate-x-0 border border-blue-gray-100`}
|
||||
className={`${sidenavTypes[sidenavType]} ${openSidenav ? "translate-x-0" : "-translate-x-80"
|
||||
} fixed inset-0 z-50 my-4 ml-4 h-[calc(100vh-32px)] w-72 rounded-xl transition-transform duration-300 xl:translate-x-0 border border-blue-gray-100`}
|
||||
>
|
||||
<div
|
||||
className={`relative`}
|
||||
>
|
||||
<Link to="/" className="py-6 px-8 text-center">
|
||||
<Typography
|
||||
variant="h6"
|
||||
color={sidenavType === "dark" ? "white" : "blue-gray"}
|
||||
>
|
||||
{brandName}
|
||||
</Typography>
|
||||
</Link>
|
||||
<div className="relative py-6 px-8">
|
||||
<img src={logo} alt="StackPulse" className="w-auto" />
|
||||
|
||||
<IconButton
|
||||
variant="text"
|
||||
color="white"
|
||||
size="sm"
|
||||
ripple={false}
|
||||
className="absolute right-0 top-0 grid rounded-br-none rounded-tl-none xl:hidden"
|
||||
className="absolute right-0 top-0 grid rounded-br-none rounded-tl-none"
|
||||
onClick={() => setOpenSidenav(dispatch, false)}
|
||||
>
|
||||
<XMarkIcon strokeWidth={2.5} className="h-5 w-5 text-white" />
|
||||
<XMarkIcon strokeWidth={2.5} className="h-5 w-5 text-black" />
|
||||
</IconButton>
|
||||
</div>
|
||||
<div className="m-4">
|
||||
@@ -70,8 +61,8 @@ export function Sidenav({ brandImg, brandName, routes }) {
|
||||
isActive
|
||||
? sidenavColor
|
||||
: sidenavType === "dark"
|
||||
? "white"
|
||||
: "blue-gray"
|
||||
? "white"
|
||||
: "blue-gray"
|
||||
}
|
||||
className="flex items-center gap-4 px-4 capitalize"
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user