wf-radio/frontend/src/components/NavBar/navbar.jsx

31 lines
892 B
React
Raw Normal View History

// Functions
import { h } from 'preact'
import { Link } from 'preact-router/match';
// Styles
2025-05-12 19:31:19 +02:00
import styles from './navbar.module.css'
// Images
import userImg from '../../assets/settings.svg'
2025-05-12 19:31:19 +02:00
function NavBar({ children, className, ...rest}) {
return (
2025-05-12 20:30:00 +02:00
<nav
2025-05-12 19:31:19 +02:00
className={styles.navbar}
{...rest} // Allow passing other props like 'disabled', 'type', etc.
>
<a className={styles.leftItem} href='/'> Home </a>
<a className={styles.leftItem} href='/mods'> Mods </a>
<a className={styles.leftItem} href='/modpacks'> Modpacks </a>
<a className={styles.leftItem} href='/about'> About </a>
<a className={styles.rightItem} href='/settings'>
<img src={userImg} width={'170%'}></img>
</a>
2025-05-12 19:31:19 +02:00
{children}
2025-05-12 20:30:00 +02:00
</nav>
2025-05-12 19:31:19 +02:00
)
}
export default NavBar;