aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/table-of-contents.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components, hooks): rewrite ToC and useHeadingsTreeArmand Philippot2023-11-141-57/+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): replace LinksListWidget with LinksWidgetArmand Philippot2023-11-141-5/+6
| | | | | | | * avoid List component repeat * rewrite tests and CSS * add an id to LinksWidgetItemData (previously LinksListItems) type because the label could be duplicated
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-111-2/+6
| | | | | | 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.
* refactor(components): rewrite List componentArmand Philippot2023-11-111-5/+4
| | | | | | | | | * change `items` prop to children * replace `kind` prop with `isHierarchical`, `isOrdered` & `isInline` props * add `hideMarker` prop * add `spacing` prop to control item spacing * move lists styles to Sass placeholders to avoid repeats because of headless WordPress
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-10/+6
| | | | | | 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/+3
| | | | | | 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.
* chore: add a LegalNotice pageArmand Philippot2022-05-031-0/+2
|
* chore: add a TableOfContents componentArmand Philippot2022-04-221-0/+53