SPB Git

spb/autoscholar

Public
952 B · 37 lines tsx
1import Link from "next/link";2import type { ReactNode } from "react";3import { IconArrow } from "./Icons";45export function SectionHeading({6  eyebrow,7  title,8  id,9  children,10  more,11  tone = "accent",12}: {13  eyebrow?: string;14  title: ReactNode;15  id?: string;16  children?: ReactNode;17  more?: { href: string; label: string };18  tone?: "accent" | "sci";19}) {20  return (21    <div className="flex flex-wrap items-end justify-between gap-x-6 gap-y-3">22      <div className="min-w-0">23        {eyebrow && <p className={`eyebrow ${tone === "sci" ? "eyebrow-sci" : ""}`}>{eyebrow}</p>}24        <h2 id={id} className="title-2 mt-1.5">25          {title}26        </h2>27        {children && <p className="muted mt-2 max-w-xl text-sm leading-relaxed">{children}</p>}28      </div>29      {more && (30        <Link href={more.href} className="btn btn-ghost btn-sm -mr-2">31          {more.label} <IconArrow size={14} />32        </Link>33      )}34    </div>35  );36}37
Files · main
Menu

Theme