import styles from './index.module.scss'; import { NavItemWithLink, PageType } from 'types'; import { usePageData } from '@render'; import { SwitchAppearance } from '../SwitchAppearance'; import classnames from 'classnames'; type IProps = { pageType?: 'default' | PageType; }; const pageTypes = { default: '', doc: styles.headerDoc }; export function MenuItem(item: NavItemWithLink) { return (
); } export function Nav(props?: IProps) { const { siteData } = usePageData(); const nav = siteData.themeConfig.nav || []; const pageTypeClassname = pageTypes[props.pageType] ?? 'default'; return (