From eb7da996a7c2d617d276f296cac07a6fd5648664 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 27 Oct 2024 12:03:14 +0000 Subject: ui: Redesign the settings page and move it to its own layout --- .../shared/sidebar/ModileSidebarItem.tsx | 27 +++++++++++ apps/web/components/shared/sidebar/SidebarItem.tsx | 55 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 apps/web/components/shared/sidebar/ModileSidebarItem.tsx create mode 100644 apps/web/components/shared/sidebar/SidebarItem.tsx (limited to 'apps/web/components/shared') diff --git a/apps/web/components/shared/sidebar/ModileSidebarItem.tsx b/apps/web/components/shared/sidebar/ModileSidebarItem.tsx new file mode 100644 index 00000000..4d3436ea --- /dev/null +++ b/apps/web/components/shared/sidebar/ModileSidebarItem.tsx @@ -0,0 +1,27 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { cn } from "@/lib/utils"; + +export default function MobileSidebarItem({ + logo, + path, +}: { + logo: React.ReactNode; + path: string; +}) { + const currentPath = usePathname(); + return ( +
  • + + {logo} + +
  • + ); +} diff --git a/apps/web/components/shared/sidebar/SidebarItem.tsx b/apps/web/components/shared/sidebar/SidebarItem.tsx new file mode 100644 index 00000000..83ce776e --- /dev/null +++ b/apps/web/components/shared/sidebar/SidebarItem.tsx @@ -0,0 +1,55 @@ +"use client"; + +import React from "react"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { cn } from "@/lib/utils"; + +export default function SidebarItem({ + name, + logo, + path, + className, + linkClassName, + style, + collapseButton, + right = null, +}: { + name: string; + logo: React.ReactNode; + path: string; + style?: React.CSSProperties; + className?: string; + linkClassName?: string; + right?: React.ReactNode; + collapseButton?: React.ReactNode; +}) { + const currentPath = usePathname(); + return ( +
  • + {collapseButton} + +
    +
    + {logo} + {name} +
    + {right} +
    + +
  • + ); +} -- cgit v1.2.3-70-g09d2