File tree Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ .logo {
2
+ height : 30px ;
3
+ cursor : pointer;
4
+ }
5
+
6
+ .header {
7
+ height : 56px ;
8
+ margin-bottom : 20px ;
9
+ background-color : var (--mantine-color-body );
10
+ border-bottom : 1px solid light-dark (var (--mantine-color-gray-3 ), var (--mantine-color-dark-4 ));
11
+ padding : 0 16px ;
12
+ }
13
+
14
+ .inner {
15
+ height : 56px ;
16
+ display : flex;
17
+ justify-content : space-between;
18
+ align-items : center;
19
+ padding : 0 ;
20
+ }
21
+
22
+ .link {
23
+ display : block;
24
+ line-height : 1 ;
25
+ padding : 8px 12px ;
26
+ border-radius : var (--mantine-radius-sm );
27
+ text-decoration : none;
28
+ color : light-dark (var (--mantine-color-gray-7 ), var (--mantine-color-dark-0 ));
29
+ font-size : var (--mantine-font-size-sm );
30
+ font-weight : 500 ;
31
+
32
+ @mixin hover {
33
+ background-color : light-dark (var (--mantine-color-gray-0 ), var (--mantine-color-dark-6 ));
34
+ }
35
+
36
+ [data-mantine-color-scheme ] & [data-active ] {
37
+ background-color : var (--mantine-color-blue-filled );
38
+ color : var (--mantine-color-white );
39
+ }
40
+ }
Original file line number Diff line number Diff line change
1
+ // With reference from official Mantine documentation
2
+ // https://ui.mantine.dev/category/headers/
3
+
4
+ import { Burger , Container , Group , Text } from "@mantine/core" ;
5
+ import { useDisclosure } from "@mantine/hooks" ;
6
+ import { useNavigate } from "react-router" ;
7
+ import classes from "./header.module.css" ;
8
+ import logo from "../../assets/images/logo.svg" ;
9
+
10
+ const links = [ { link : "/user" , label : "Home" } ] ;
11
+
12
+ export default function Header ( ) {
13
+ const [ opened , { toggle } ] = useDisclosure ( false ) ;
14
+ const navigate = useNavigate ( ) ;
15
+
16
+ return (
17
+ < header className = { classes . header } >
18
+ < Container size = { "md" } className = { classes . inner } >
19
+ < Group >
20
+ < img
21
+ src = { logo }
22
+ alt = "PeerPrep Logo"
23
+ className = { classes . logo }
24
+ onClick = { ( ) => navigate ( "/" ) }
25
+ />
26
+ </ Group >
27
+ < Group gap = { 5 } >
28
+ < Text > NorbertLoh</ Text >
29
+ </ Group >
30
+ </ Container >
31
+ </ header >
32
+ ) ;
33
+ }
You can’t perform that action at this time.
0 commit comments