Spaces:
Running
Running
Download frontend/src/components/Navbar.js from xenecode/Jaguar_Project: direct link, hf CLI and curl.
- Browser
- Download file 1.64 kB
-
https://huggingface.co/spaces/xenecode/Jaguar_Project/resolve/main/frontend/src/components/Navbar.js
- Command line
-
hf download hf://spaces/xenecode/Jaguar_Project/frontend/src/components/Navbar.js
-
curl -L -o Navbar.js https://huggingface.co/spaces/xenecode/Jaguar_Project/resolve/main/frontend/src/components/Navbar.js
1.64 kB
| 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; | |