MCPcopy Create free account
hub / github.com/chrhi/studio / SectionIntro

Function SectionIntro

src/components/SectionIntro.jsx:6–56  ·  view source on GitHub ↗
({
  eyebrow,
  title,
  children,
  smaller = false,
  invert = false,
  ...props
})

Source from the content-addressed store, hash-verified

4import clsx from "clsx";
5
6const SectionIntro = ({
7 eyebrow,
8 title,
9 children,
10 smaller = false,
11 invert = false,
12 ...props
13}) => {
14 return (
15 <Container {...props}>
16 <FadeIn className="max-w-2xl">
17 <h2>
18 {eyebrow && (
19 <>
20 <span
21 className={clsx(
22 "mb-6 block font-display text-base font-semibold",
23 invert ? "text-white" : "text-neutral-950"
24 )}
25 >
26 {eyebrow}
27 </span>
28 <span className="sr-only"> - </span>
29 </>
30 )}
31 <span
32 className={clsx(
33 "block font-display tracking-tight [text-wrap:balance]",
34 smaller
35 ? "text-2xl font-semibold"
36 : "text-4xl font-medium sm:text-5xl",
37 invert ? "text-white" : "text-neutral-950"
38 )}
39 >
40 {title}
41 </span>
42 </h2>
43 {children && (
44 <div
45 className={clsx(
46 "mt-6 text-xl",
47 invert ? "text-neutral-300" : "text-neutral-600"
48 )}
49 >
50 {children}
51 </div>
52 )}
53 </FadeIn>
54 </Container>
55 );
56};
57
58export default SectionIntro;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected