This commit is contained in:
Felix Klement committed 2026-09-20 12:45:33 +02:00
1 parent b244287f6a
commit 5a2d49c17f
77 files changed
+2289 -31

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import type { ReactNode } from 'react';
import { cx } from './cx';
export interface SectionProps {
/** Paper is the default. Night is a dramatic device: the hero and at most one more. */
tone?: 'paper' | 'night';
/** `tight` for a subordinate band, `intro` for a page head. */
spacing?: 'default' | 'tight' | 'intro';
id?: string;
children?: ReactNode;
}
/** One horizontal band of the page, carrying the vertical air around its content. */
export function Section({ tone = 'paper', spacing = 'default', id, children }: SectionProps) {
return (
<section
id={id}
className={cx(
'section',
spacing === 'tight' && 'section--tight',
spacing === 'intro' && 'section--intro',
tone === 'night' && 'night',
)}
>
{children}
</section>
);
}