aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/toc-widget/toc-widget.test.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components, hooks): rewrite ToC and useHeadingsTreeArmand Philippot2023-11-141-0/+44
* replace TableOfContents component with TocWidget to keep the name of widget components coherent * replace `wrapper` prop with `tree` prop (the component no longer uses the hook, it is up to the consumer to provide the headings tree) * let consumer handle the widget title * add options to useHeadingsTree hook to retrieve only the wanted headings (and do not assume that h1 is unwanted) * expect an ref object instead of an element in useHeadingsTree hook * rename most of the types involved