aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/table-of-contents.test.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components, hooks): rewrite ToC and useHeadingsTreeArmand Philippot2023-11-141-11/+0
| | | | | | | | | | | | * 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
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-111-5/+3
| | | | | | The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
* build: convert project to esmArmand Philippot2023-10-241-0/+1
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-1/+1
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-1/+1
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* test: install and configure cypressArmand Philippot2022-06-021-1/+1
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* chore: add a TableOfContents componentArmand Philippot2022-04-221-0/+12