Skip to content

Commit

Permalink
Merge pull request #55 from JimTheCat/CU-8696pb2r2_Create-a-navbar_Pa…
Browse files Browse the repository at this point in the history
…tryk-Kosiski

Cu 8696pb2r2 create a navbar patryk kosiski
  • Loading branch information
JimTheCat authored Nov 17, 2024
2 parents b871e5c + b1875a8 commit a4a1c75
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 88 deletions.
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>MeowHub</title>
</head>
<body>
<div id="root"></div>
Expand Down
140 changes: 66 additions & 74 deletions frontend/package-lock.json

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

10 changes: 5 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"test": "jest"
},
"dependencies": {
"@mantine/core": "^7.13.3",
"@mantine/dates": "^7.13.3",
"@mantine/form": "^7.13.3",
"@mantine/hooks": "^7.13.3",
"@tabler/icons-react": "^2.35.0",
"@mantine/core": "^7.14.1",
"@mantine/dates": "^7.14.1",
"@mantine/form": "^7.14.1",
"@mantine/hooks": "^7.14.1",
"@tabler/icons-react": "^3.22.0",
"dayjs": "^1.11.13",
"i18next": "^23.16.1",
"react": "^18.3.1",
Expand Down
11 changes: 11 additions & 0 deletions frontend/public/mh_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions frontend/src/Components/Buttons/Menu/MenuButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {Button} from "@mantine/core";
import React from "react";

type MenuButtonProps = {
text: string;
icon: React.ReactNode;
}

export const MenuButton = (props: MenuButtonProps) => {
return (
<Button
variant={"subtle"}
size={"md"}
leftSection={props.icon}
autoContrast
fullWidth
justify={"flex-start"}
color={"gray"}
>
{props.text}
</Button>
);
}
1 change: 1 addition & 0 deletions frontend/src/Components/Buttons/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './MenuButton';
12 changes: 4 additions & 8 deletions frontend/src/Components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import {AppShell, Skeleton} from "@mantine/core";
import {AppShell} from "@mantine/core";
import {Outlet} from "react-router-dom";
import {Navbar} from "../Navbar";

export const Layout = () => {
return (
<AppShell
navbar={{width: 300, breakpoint: 'xs'}}
>
{/*TODO: Modify a navbar*/}
<AppShell.Navbar p="md">
Navbar
{Array(15)
.fill(0)
.map((_, index) => (
<Skeleton key={index} h={28} mt="sm" animate={false}/>
))}
<AppShell.Navbar withBorder={false}>
<Navbar/>
</AppShell.Navbar>
<AppShell.Main>
<Outlet/>
Expand Down
Loading

0 comments on commit a4a1c75

Please sign in to comment.