import { getAssetForTone, MAIN_WHITE_PATTERN_SRC, type TopoPatternId, type TopoSectionTone, resolveTopoPattern, } from "@/content/topo-patterns"; import { cn } from "@/lib/utils"; export type TopoTextClearance = "section" | "header" | "none"; type Props = { pattern?: TopoPatternId; opacity?: number; tone?: TopoSectionTone; textClearance?: TopoTextClearance; className?: string; }; /** mainwhite.svg on white sections only */ export function TopographicPattern({ pattern = "topo-main", opacity, tone = "light", className, }: Props) { const id = resolveTopoPattern(pattern); if (!id || tone === "green") return null; const asset = getAssetForTone("light"); const layerOpacity = opacity ?? asset.defaultOpacity; return (
{/* eslint-disable-next-line @next/next/no-img-element */}
); }