Skip to content

Commit

Permalink
feat: dashboard responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufgns committed Oct 27, 2023
1 parent c5aac2a commit 30801f3
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function DataTableRowActions<TData extends object>({
}, [status]);

return (
<div className="w-full relative z-50">
<div className="w-full relative z-10">
{row.original.title !== "initial" && (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import NavProfile from "../../NavProfile";
import ThemeMode from "../../ThemeMode";
import Feedback from "./Feedback";
import Navigation from "./Navigation";
import DashboardHeader from "@/components/Layout/Dashboard/DashboardHeader";
import DashboardNavigation from "@/components/Layout/Dashboard/Sidebar/Navigation";
import ChangeLanguage from "@/components/Layout/MainLayout/ChangeLanguage";
import DynamicLogo from "@/components/Logo/DynamicLogo";
import StaticLogo from "@/components/Logo/StaticLogo";
Expand Down Expand Up @@ -32,7 +34,7 @@ export default function HomeHeader({ className }: { className?: string }) {
className
)}
>
<nav className="flex items-center justify-between w-full m-auto py-[1.125rem] px-20 max-md:px-4">
<nav className="flex items-center justify-between w-full m-auto py-[1.125rem] px-20 max-md:px-4 max-8xl:px-5">
<div className="flex items-center">
<Link
href="/"
Expand Down Expand Up @@ -90,7 +92,7 @@ export default function HomeHeader({ className }: { className?: string }) {
animate={{ x: 0 }}
exit={{ x: "100%" }}
transition={{ duration: 0.3, ease: "easeInOut" }}
className="col-span-1 flex flex-col fixed justify-between top-0 right-0 z-50 py-4 text-light_text dark:text-white bg-LightBackground dark:bg-DarkBackground g-red-500 px-5 min-w-[280px] max-w-[280px] border-l shadow-md shadow-[rgba(16, 24, 40, 1)] h-screen lg:hidden"
className="col-span-1 flex flex-col fixed justify-between top-0 right-0 z-50 py-4 text-light_text dark:text-white bg-LightBackground dark:bg-DarkBackground g-red-500 px-5 min-w-[280px] max-w-[280px] border-l shadow-md shadow-[rgba(16, 24, 40, 1)] h-screen lg:hidden z-50"
>
<span className="flex items-center flex-col w-full mb-8">
<div className="font-bold text-[18px] flex items-center select-none pt-3 justify-between w-full">
Expand All @@ -114,7 +116,7 @@ export default function HomeHeader({ className }: { className?: string }) {
</div>

<div className="flex w-full md:flex-col py-4">
<Navigation variant="borgerMenu" />
<DashboardNavigation />
</div>
</span>

Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/components/Layout/Dashboard/Sidebar/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DashboardNav from "./Navigation";

export default function BurgerMenu() {
return (
<div className="col-span-1 flex flex-col justify-between md:top-50 top-50 !h-20 md:!h-full sticky top-[60px] py-4 md:py-8 z-40 text-light_text dark:text-white dark:bg-DarkBackground bg-LightBackground border-t md:border-t-0 g-red-500 md:min-w-[250px] md:max-w-[250px]">
<div className="col-span-1 flex flex-col justify-between md:top-50 top-50 !h-20 md:!h-full sticky top-[60px] py-4 md:py-8 z-40 text-light_text dark:text-white dark:bg-DarkBackground bg-LightBackground border-t md:border-t-0 g-red-500 md:min-w-[250px] md:max-w-[250px] max-[1022px]:hidden">
<aside className="flex w-full md:flex-col">
<DashboardNav />
</aside>
Expand Down
8 changes: 4 additions & 4 deletions apps/next/src/components/Layout/Dashboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Breadcrumb from "./Breadcrumb";
import HomeHeader from "./HomeHeader";
import DashboardHeader from "./DashboardHeader";
import Sidebar from "@/components/Layout/Dashboard/Sidebar/Menu";
import PageLoader from "@/components/UI/PageLoader";
import { useAppSelector } from "@/utils/hooks";
Expand All @@ -17,10 +17,10 @@ export default function DashboardLayout({ children }: DashboardLayoutProps) {

return (
<main className="max-w-[90rem] m-auto">
<HomeHeader />
<div className="m-auto flex px-20">
<DashboardHeader />
<div className="m-auto flex px-20 max-8xl:px-5 max-[1022px]:px-0">
<Sidebar />
<section className="py-4 px-4 md:py-8 md:px-8 w-full m-auto overflow-auto mt-5">
<section className="py-4 px-4 md:py-8 md:px- w-full m-auto overflow-auto mt-5 max-[1022px]:px-5">
<main className="flex items-center justify-between w-full mb-6">
<Breadcrumb />
</main>
Expand Down

0 comments on commit 30801f3

Please sign in to comment.