|
|
|
@ -2,8 +2,9 @@ import React, { ReactNode, ComponentType } from "react"; |
|
|
|
|
import styles from "./OrganizedContent.module.css"; |
|
|
|
|
|
|
|
|
|
export interface LinkProps { |
|
|
|
|
children: string | ReactNode | (string | ReactNode)[]; |
|
|
|
|
className: string; |
|
|
|
|
url: string; |
|
|
|
|
children: string | ReactNode | (string | ReactNode)[]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type Link = ComponentType<LinkProps>; |
|
|
|
@ -68,7 +69,6 @@ export const OrganizedContent = ({ |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//todo push class to link
|
|
|
|
|
const Nav = ({ headings, currentIndex, link: Link }: ChildProps) => { |
|
|
|
|
return ( |
|
|
|
|
<div className={styles.nav}> |
|
|
|
@ -87,7 +87,9 @@ const Nav = ({ headings, currentIndex, link: Link }: ChildProps) => { |
|
|
|
|
{index === currentIndex && ( |
|
|
|
|
<span className={styles.selectedMarker} /> |
|
|
|
|
)} |
|
|
|
|
<Link url={heading.url}>{heading.name}</Link> |
|
|
|
|
<Link className={styles.navLink} url={heading.url}> |
|
|
|
|
{heading.name} |
|
|
|
|
</Link> |
|
|
|
|
</div> |
|
|
|
|
<div className={styles.divider}></div> |
|
|
|
|
</div> |
|
|
|
|