diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-03 16:51:22 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-03 16:51:22 +0200 |
| commit | 83a029084f1bbfd78b7099d9bea3371d4533c6d9 (patch) | |
| tree | f99854e4cb430ccbdb725cb2e287423f80cb9791 /src/components/organisms/widgets | |
| parent | 732d0943f8041d76262222a092b014f2557085ef (diff) | |
chore: add a LegalNotice page
Diffstat (limited to 'src/components/organisms/widgets')
4 files changed, 16 insertions, 5 deletions
diff --git a/src/components/organisms/widgets/links-list-widget.module.scss b/src/components/organisms/widgets/links-list-widget.module.scss index cbad83e..4444df4 100644 --- a/src/components/organisms/widgets/links-list-widget.module.scss +++ b/src/components/organisms/widgets/links-list-widget.module.scss @@ -3,6 +3,12 @@ .widget { .list { + .list { + > *:first-child { + border-top: fun.convert-px(1) solid var(--color-primary); + } + } + &__link { display: block; padding: var(--spacing-2xs) var(--spacing-xs); @@ -50,9 +56,7 @@ &__item { &:not(:last-child) { - .list__link { - border-bottom: fun.convert-px(1) solid var(--color-primary); - } + border-bottom: fun.convert-px(1) solid var(--color-primary); } > .list { diff --git a/src/components/organisms/widgets/links-list-widget.tsx b/src/components/organisms/widgets/links-list-widget.tsx index 559d0b6..37a20fc 100644 --- a/src/components/organisms/widgets/links-list-widget.tsx +++ b/src/components/organisms/widgets/links-list-widget.tsx @@ -24,7 +24,7 @@ export type LinksListItems = { }; export type LinksListWidgetProps = Pick<WidgetProps, 'level' | 'title'> & - Pick<ListProps, 'kind'> & { + Pick<ListProps, 'className' | 'kind'> & { /** * An array of name/url couple. */ @@ -37,6 +37,7 @@ export type LinksListWidgetProps = Pick<WidgetProps, 'level' | 'title'> & * Render a list of links inside a widget. */ const LinksListWidget: FC<LinksListWidgetProps> = ({ + className = '', items, kind = 'unordered', ...props @@ -74,7 +75,7 @@ const LinksListWidget: FC<LinksListWidgetProps> = ({ items={getListItems(items)} kind={kind} withMargin={false} - className={`${styles.list} ${styles[listKindClass]}`} + className={`${styles.list} ${styles[listKindClass]} ${className}`} itemsClassName={styles.list__item} /> </Widget> diff --git a/src/components/organisms/widgets/table-of-contents.module.scss b/src/components/organisms/widgets/table-of-contents.module.scss new file mode 100644 index 0000000..36217ed --- /dev/null +++ b/src/components/organisms/widgets/table-of-contents.module.scss @@ -0,0 +1,4 @@ +.list { + font-size: var(--font-size-sm); + font-weight: 500; +} diff --git a/src/components/organisms/widgets/table-of-contents.tsx b/src/components/organisms/widgets/table-of-contents.tsx index 3778e02..800ff58 100644 --- a/src/components/organisms/widgets/table-of-contents.tsx +++ b/src/components/organisms/widgets/table-of-contents.tsx @@ -2,6 +2,7 @@ import useHeadingsTree, { type Heading } from '@utils/hooks/use-headings-tree'; import { FC } from 'react'; import { useIntl } from 'react-intl'; import LinksListWidget, { type LinksListItems } from './links-list-widget'; +import styles from './table-of-contents.module.scss'; type TableOfContentsProps = { /** @@ -46,6 +47,7 @@ const TableOfContents: FC<TableOfContentsProps> = ({ wrapper }) => { title={title} level={2} items={getItems(headingsTree)} + className={styles.list} /> ); }; |
