Files
authentik/website/docusaurus-theme/components/Glossary/SectionNav.tsx
Dominic R 96eb8dda0f website: Glossary (#16007)
* website: Glossary

fix minor issues

wip

Apply suggestion from @dominic-r

Signed-off-by: Dominic R <dominic@sdko.org>

anchor to param

wip

wip

at least the lockfile changes now

sure

a-z first as tana asked

idk why i switched in the first place

wip

wip

lock

lockfiles are hard

wip

please work

no have?

Revert "no have?"

This reverts commit 743dbc1bc2900eedcc2c93af248e6afdec3688a3.

* changed to sentence-case capitalization

---------

Co-authored-by: Tana M Berry <tana@goauthentik.io>
2025-12-02 21:36:51 -05:00

41 lines
1.0 KiB
TypeScript

import styles from "./styles.module.css";
import { formatTag } from "./utils";
import clsx from "clsx";
import React from "react";
/**
* Tag-based navigation for categorized view.
* Shows all available tags and highlights selected ones.
*/
export interface SectionNavProps {
availableTags: string[];
selectedTags: string[];
onToggleTag: (tag: string) => void;
}
export const SectionNav: React.FC<SectionNavProps> = ({
availableTags,
selectedTags,
onToggleTag,
}) => {
return (
<div className={styles.sectionNav}>
{availableTags.map((tag) => (
<button
key={tag}
className={clsx(
styles.sectionButton,
selectedTags.includes(tag) && styles.active,
)}
onClick={() => onToggleTag(tag)}
>
{formatTag(tag)}
</button>
))}
</div>
);
};
export default SectionNav;