import { CSSProperties, ReactNode } from 'react'; import HomeRoundedIcon from '@material-ui/icons/HomeRounded'; import SearchRoundedIcon from '@material-ui/icons/SearchRounded'; import MenuIcon from '@material-ui/icons/Menu'; export function NavbarItem(props: { icon?: ReactNode; title: string; href?: string; active?: boolean; children?: ReactNode; classList?: Array; style?: CSSProperties; outerStyle?: CSSProperties; onIconClick?: () => void; onClick?: () => void; }) { var classes = props.classList || []; classes.push('navbarItem'); props.active && classes.push('active'); return
{props.icon}
{props.title}
{props.children}
; } export default function Navbar(props: { page?: string; }) { return
} title='Home' href='/' classList={['indentLevel0', 'link']} /> } title='Search for posts' href='/search' classList={['indentLevel0', 'link']} />
; } export function MobileNavbar() { return
{ document.getElementsByClassName("mobileNav")[0].classList.toggle("open"); document.getElementsByClassName("navAreaWrapper")[0].classList.toggle("navVisible"); }}>
; }