| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import type { AboutSection } from '../types';
- import { Container } from '../ui';
-
- export function About({ section }: { section: AboutSection }) {
- const { heading, body, stats } = section.content;
- const showStats = section.variant === 'with-stats' && stats.length > 0;
-
- return (
- <section
- id={section.id}
- className="sf-section scroll-mt-20 py-16 md:py-24"
- >
- <Container
- className={showStats ? 'grid gap-12 md:grid-cols-2' : ''}
- >
- <div
- className={showStats ? '' : 'mx-auto max-w-2xl text-center'}
- >
- <h2 className="sf-heading text-3xl leading-tight font-semibold text-balance sm:text-4xl">
- {heading}
- </h2>
- <p className="mt-5 text-lg leading-relaxed whitespace-pre-line text-(--sf-muted)">
- {body}
- </p>
- </div>
-
- {showStats && (
- <dl className="sf-card grid content-center gap-px overflow-hidden rounded-(--sf-radius-card) border border-(--sf-border) bg-(--sf-border) sm:grid-cols-3 md:grid-cols-1">
- {stats.map((stat) => (
- <div
- key={stat.label}
- className="flex flex-col-reverse gap-1 bg-(--sf-bg) p-6"
- >
- <dt className="text-sm text-(--sf-muted)">
- {stat.label}
- </dt>
- <dd className="sf-heading text-3xl font-semibold text-(--sf-primary)">
- {stat.value}
- </dd>
- </div>
- ))}
- </dl>
- )}
- </Container>
- </section>
- );
- }
|