| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { cn } from '@/lib/utils';
- import type { FooterSection } from '../types';
- import { Container, SfLink } from '../ui';
-
- export function Footer({
- section,
- }: {
- section: Pick<FooterSection, 'variant' | 'content'>;
- }) {
- const { text, links } = section.content;
- const centered = section.variant === 'centered';
-
- return (
- <footer className="border-t border-(--sf-border)">
- <Container
- className={cn(
- 'flex flex-col gap-4 py-8 text-sm text-(--sf-muted)',
- centered
- ? 'items-center text-center'
- : 'sm:flex-row sm:items-center sm:justify-between',
- )}
- >
- <p>{text}</p>
- {links.length > 0 && (
- <nav aria-label="Footer" className="flex flex-wrap gap-5">
- {links.map((link) => (
- <SfLink
- key={link.label + link.href}
- href={link.href}
- className="transition-colors hover:text-(--sf-fg)"
- >
- {link.label}
- </SfLink>
- ))}
- </nav>
- )}
- </Container>
- </footer>
- );
- }
|