diff --git a/src/components/Navigation/index.tsx b/src/components/Navigation/index.tsx index 7dce61c1ddf..f33d4d07e5d 100644 --- a/src/components/Navigation/index.tsx +++ b/src/components/Navigation/index.tsx @@ -16,17 +16,41 @@ import React, { type ReactNode } from 'react'; import Link from '@docusaurus/Link'; +import { useLocation } from '@docusaurus/router'; +import useBaseUrl from '@docusaurus/useBaseUrl'; import styles from './styles.module.css'; -function Navigation({ links }) { +interface NavLink { + label: string; + href: string; +} + +interface NavigationProps { + links: NavLink[]; +} + +function Navigation({ links }: NavigationProps) { + const location = useLocation(); + return ( ); diff --git a/src/components/Navigation/styles.module.css b/src/components/Navigation/styles.module.css index 699415ccbae..7969b921e0e 100644 --- a/src/components/Navigation/styles.module.css +++ b/src/components/Navigation/styles.module.css @@ -4,3 +4,8 @@ gap: 2rem; justify-content: center; } + +.active a { + font-weight: 700; + text-decoration: underline; +}