diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-20 15:23:47 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | 98044be08600daf6bd7c7e1a4adada319dbcbbaf (patch) | |
| tree | 73b5509d2061a984a8f1e22ff776fdcdb764ecce /src/components/organisms/layout/site-footer.tsx | |
| parent | 9492414d4ae94045eff4e06f636529bc0e71cb06 (diff) | |
feat(components): add a Colophon component
Diffstat (limited to 'src/components/organisms/layout/site-footer.tsx')
| -rw-r--r-- | src/components/organisms/layout/site-footer.tsx | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/components/organisms/layout/site-footer.tsx b/src/components/organisms/layout/site-footer.tsx index 9ed5ce6..ccab051 100644 --- a/src/components/organisms/layout/site-footer.tsx +++ b/src/components/organisms/layout/site-footer.tsx @@ -4,20 +4,13 @@ import { Footer } from '../../atoms'; import { BackToTop, type BackToTopProps, - NavList, - NavItem, - NavLink, + Colophon, + type ColophonLink, type CopyrightProps, Copyright, } from '../../molecules'; import styles from './site-footer.module.scss'; -export type FooterLinks = { - id: string; - href: string; - label: string; -}; - export type SiteFooterProps = { /** * Set additional classnames to the back to top button. @@ -38,7 +31,7 @@ export type SiteFooterProps = { /** * The footer nav items. */ - navItems?: FooterLinks[]; + navItems?: ColophonLink[]; /** * An element id (without hashtag) used as anchor for back to top button. */ @@ -59,11 +52,6 @@ export const SiteFooter: FC<SiteFooterProps> = ({ topId, }) => { const intl = useIntl(); - const ariaLabel = intl.formatMessage({ - defaultMessage: 'Footer', - description: 'SiteFooter: an accessible name for the footer nav', - id: 'pRzkFR', - }); const backToTop = intl.formatMessage({ defaultMessage: 'Back to top', description: 'SiteFooter: an accessible name for the back to top button', @@ -75,17 +63,11 @@ export const SiteFooter: FC<SiteFooterProps> = ({ return ( <Footer className={footerClass}> - <Copyright {...copyright} /> - {license} - {navItems ? ( - <NavList aria-label={ariaLabel} className={styles.nav} isInline> - {navItems.map(({ id, ...link }) => ( - <NavItem key={id}> - <NavLink {...link} /> - </NavItem> - ))} - </NavList> - ) : null} + <Colophon + copyright={<Copyright {...copyright} />} + license={license} + links={navItems} + /> <BackToTop anchor={backToTopAnchor} className={btnClass} |
