aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/components/pages/home-shared/FeaturesBento.tsx
blob: f2664dbcb8d6f132d7de21034f95c785b0cb69f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { Features } from "../../../content/features";
import { FadeIn } from "./FadeIn";
import { SectionHeader, SectionSubtext } from "./Headings";
import { FeatureBox } from "./FeatureBox";

export function FeaturesBento({
  header,
  body,
  features,
}: {
  header: string;
  body: string;
  features: Features;
}) {
  return (
    <section className="relative flex flex-col items-center px-6 pb-16 font-sans md:pb-24 lg:pb-32 gap-9 lg:gap-14">
      <FadeIn className="flex flex-col items-center gap-5 md:gap-6">
        <SectionHeader>{header}</SectionHeader>
        <SectionSubtext>{body}</SectionSubtext>
      </FadeIn>
      <div className="grid grid-cols-1 gap-x-4 gap-y-4 sm:grid-cols-2 lg:grid-cols-3 lg:gap-x-6 lg:gap-y-6 max-w-[1200px]">
        {features.map((feature) => (
          <FadeIn
            className="flex"
            key={feature.name.replace(/\s+/g, "-").toLowerCase()}
          >
            <FeatureBox
              name={feature.name}
              description={feature.description}
              iconDark={feature.iconDark}
              iconLight={feature.iconLight}
            />
          </FadeIn>
        ))}
      </div>
    </section>
  );
}