AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import type { AboutSection } from '../types';
  2. import { Container } from '../ui';
  3. export function About({ section }: { section: AboutSection }) {
  4. const { heading, body, stats } = section.content;
  5. const showStats = section.variant === 'with-stats' && stats.length > 0;
  6. return (
  7. <section
  8. id={section.id}
  9. className="sf-section scroll-mt-20 py-16 md:py-24"
  10. >
  11. <Container
  12. className={showStats ? 'grid gap-12 md:grid-cols-2' : ''}
  13. >
  14. <div
  15. className={showStats ? '' : 'mx-auto max-w-2xl text-center'}
  16. >
  17. <h2 className="sf-heading text-3xl leading-tight font-semibold text-balance sm:text-4xl">
  18. {heading}
  19. </h2>
  20. <p className="mt-5 text-lg leading-relaxed whitespace-pre-line text-(--sf-muted)">
  21. {body}
  22. </p>
  23. </div>
  24. {showStats && (
  25. <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">
  26. {stats.map((stat) => (
  27. <div
  28. key={stat.label}
  29. className="flex flex-col-reverse gap-1 bg-(--sf-bg) p-6"
  30. >
  31. <dt className="text-sm text-(--sf-muted)">
  32. {stat.label}
  33. </dt>
  34. <dd className="sf-heading text-3xl font-semibold text-(--sf-primary)">
  35. {stat.value}
  36. </dd>
  37. </div>
  38. ))}
  39. </dl>
  40. )}
  41. </Container>
  42. </section>
  43. );
  44. }