'use client'; import type { FC, ReactNode } from 'react'; import { useTableOfContentAnchor } from '../TableOfContent/TableOfContent'; import styles from './Headline.module.css'; export interface HeadlineProps { children: ReactNode, tableOfContentLabel?: ReactNode, id: string, noToc?: boolean, actions?: ReactNode, } export const Headline: FC = ({ children, tableOfContentLabel, id, noToc = false, actions }) => { const ref = useTableOfContentAnchor(id, { label: tableOfContentLabel ?? children, enabled: !noToc }); return (

{children} {actions &&
{actions}
}

); };