Fix: Navbar admin

Deskripsi:
- Fix bug navbar yang terpotong bagian atasnya
This commit is contained in:
2024-11-18 15:18:35 +08:00
parent 1f8bfcbed9
commit 5fcb09b889
111 changed files with 284 additions and 2930 deletions

View File

@@ -1,64 +0,0 @@
"use client";
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function ComponentGlobal_HeaderTamplate({
route,
route2,
title,
icon,
}: {
route?: any;
route2?: any;
title: string;
icon?: any;
}) {
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [isRightLoading, setRightLoading] = useState(false);
return (
<>
<Header height={50} sx={{ borderStyle: "none" }}>
<Group h={50} position="apart" px={"md"}>
<ActionIcon
loading={isLoading ? true : false}
variant="transparent"
onClick={() => {
setIsLoading(true);
if (route === null || route === undefined) {
return router.back();
} else {
return router.push(route);
}
}}
>
<IconChevronLeft />
</ActionIcon>
<Title order={5}>{title}</Title>
{(() => {
if (route2 === null || route2 === undefined) {
return <ActionIcon disabled variant="transparent"></ActionIcon>;
} else {
return (
<ActionIcon
loading={isRightLoading ? true : false}
variant="transparent"
onClick={() => {
setRightLoading(true);
router.push(route2);
}}
>
{icon}
</ActionIcon>
);
}
})()}
</Group>
</Header>
</>
);
}

View File

@@ -47,11 +47,15 @@ export default function UIGlobal_LayoutHeaderTamplate({
return (
<>
<Header
height={"8vh"}
<Box
h={"8vh"}
// w={"100%"}
// pos={"sticky"}
// top={0}
// style={{
// zIndex: 10,
// }}
sx={{
// borderRadius: "0px 0px 20px 20px",
// borderBottom: `1px solid ${AccentColor.blue}`,
borderStyle: "none",
}}
bg={backgroundColor ? backgroundColor : MainColor.darkblue}
@@ -110,7 +114,7 @@ export default function UIGlobal_LayoutHeaderTamplate({
</ActionIcon>
)}
</Group>
</Header>
</Box>
</>
);
}

View File

@@ -5,7 +5,7 @@ import {
Box,
Container,
rem,
ScrollArea
ScrollArea,
} from "@mantine/core";
import React from "react";
import { AccentColor, MainColor } from "../color/color_pallet";
@@ -16,7 +16,7 @@ export default function UIGlobal_LayoutTamplate({
footer,
}: {
children: React.ReactNode;
header?: React.ReactNode;
header: React.ReactNode;
footer?: React.ReactNode;
}) {
return (
@@ -52,21 +52,18 @@ export default function UIGlobal_LayoutTamplate({
export function UIHeader({ header }: { header: React.ReactNode }) {
return (
<>
{header ? (
<Box
h={"8vh"}
style={{
zIndex: 10,
}}
w={"100%"}
pos={"sticky"}
top={0}
>
{header}
</Box>
) : (
""
)}
<Box
h={"8vh"}
style={{
zIndex: 10,
alignContent: "center",
}}
w={"100%"}
pos={"sticky"}
top={0}
>
{header}
</Box>
</>
);
}

View File

@@ -1,19 +1,19 @@
"use client";
import { Loader, Stack, ThemeIcon } from "@mantine/core";
import UIGlobal_LayoutTamplate from "./ui_layout_tamplate";
import UIGlobal_LayoutDefault from "./ui_layout_default";
export default function UIGlobal_SplashScreen({ icon }: { icon: any }) {
return (
<>
<UIGlobal_LayoutTamplate>
<UIGlobal_LayoutDefault>
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
<ThemeIcon variant="transparent" size={300} c="white">
{icon}
</ThemeIcon>
<Loader variant="dots" color="white" />
</Stack>
</UIGlobal_LayoutTamplate>
</UIGlobal_LayoutDefault>
</>
);
}