File size: 1,636 Bytes
fba4209
aec3a91
 
 
6c68d01
 
 
aec3a91
fba4209
 
 
b225f7d
aec3a91
 
 
 
 
 
b225f7d
6c68d01
b225f7d
aec3a91
 
 
 
 
 
 
 
b225f7d
aec3a91
 
 
 
 
fba4209
aec3a91
 
fba4209
aec3a91
 
fba4209
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import React from 'react';
import { NavLink } from 'react-router-dom';

const LINKS = [
  { to: '/', label: 'Control', end: true },
  { to: '/dashboard', label: 'Dashboard' },
  { to: '/debug', label: 'Diagnostics' },
];

const Navbar = () => {
  return (
    <nav className="sticky top-0 z-50 flex h-12 items-center justify-between gap-2 border-b border-hmi-line bg-hmi-bg px-3 font-hmi text-hmi-text sm:px-4">
      <NavLink
        to="/"
        className="flex items-center gap-2.5 text-hmi-text hover:text-hmi-text"
      >
        <span className="h-3 w-3 bg-hmi-accent" aria-hidden="true" />
        <span className="text-base font-bold uppercase tracking-[0.2em]">Jaguar</span>
        <span className="hidden border-l border-hmi-line pl-2.5 text-xs text-hmi-muted lg:inline">
          FR5 robotic 3D scanning and measurement station
        </span>
      </NavLink>
      <ul className="flex h-full">
        {LINKS.map(({ to, label, end }) => (
          <li key={to} className="h-full">
            <NavLink
              to={to}
              end={end}
              className={({ isActive }) =>
                `flex h-full items-center border-b-2 px-2 text-xs font-semibold uppercase tracking-[0.06em] transition-colors sm:px-4 sm:text-sm sm:tracking-[0.1em] ${
                  isActive
                    ? 'border-hmi-accent text-hmi-text hover:text-hmi-text'
                    : 'border-transparent text-hmi-muted hover:text-hmi-text'
                }`
              }
            >
              {label}
            </NavLink>
          </li>
        ))}
      </ul>
    </nav>
  );
};

export default Navbar;