sam
0f3ab19f6f
This means it's not possible to manually change the theme, but all major operating systems support global dark mode now, so it shouldn't be a huge problem. Will re-add the dark mode toggle if the Sec-CH-Prefers-Color-Scheme header gets added to Firefox and Safari.
22 lines
588 B
TypeScript
22 lines
588 B
TypeScript
import { ReactNode } from "react";
|
|
import { Nav, Navbar } from "react-bootstrap";
|
|
import { Link } from "@remix-run/react";
|
|
import Logo from "~/components/nav/Logo";
|
|
|
|
export default function BaseNavbar({ children }: { children?: ReactNode; }) {
|
|
return (
|
|
<Navbar expand="lg" className={`mb-4 mx-2`}>
|
|
<Navbar.Brand to="/" as={Link}>
|
|
<Logo />
|
|
</Navbar.Brand>
|
|
{children && (
|
|
<>
|
|
<Navbar.Toggle aria-controls="main-navbar" />
|
|
<Navbar.Collapse id="main-navbar">
|
|
<Nav className="ms-auto">{children}</Nav>
|
|
</Navbar.Collapse>
|
|
</>
|
|
)}
|
|
</Navbar>
|
|
);
|
|
}
|