/** * Shared settings chrome — the shell + row primitives used by the settings * hub (`/settings`) and every dedicated setting page under it * (`/settings/reading`, `/settings/notifications`, `/settings/account`, * `/settings/legal`). * * All presentational, no hooks — safe to render from server components. The * hub is a menu of `NavRow`s that route into these pages; each page frames * its controls with `SettingsShell` (back link + title) so the header reads * consistently everywhere. `Section` / `Row` are the plain, card-less * building blocks the individual pages compose. */ import Link from "next/link"; import { ChevronLeft, ChevronRight } from "lucide-react"; /** Page frame: back link + title (+ optional description) over the content. */ export function SettingsShell({ backHref, backLabel, title, description, children, }: { backHref: string; backLabel: string; title: string; description?: string; children: React.ReactNode; }) { return (
{backLabel}

{title}

{description ? (

{description}

) : null}
{children}
); } /** A grouped, bordered list container — wrap `NavRow`s (hub, legal). */ export function NavList({ children }: { children: React.ReactNode }) { return ( ); } /** A tappable navigation row: icon + label/description on the left, a * chevron on the right. The whole row is the link target. */ export function NavRow({ href, icon, label, description, }: { href: string; icon?: React.ReactNode; label: string; description?: string; }) { return (
  • {icon ? ( {icon} ) : null} {label} {description ? ( {description} ) : null}
  • ); } /** A titled block within a settings page (used by pages that stack more * than one control group). */ export function Section({ title, description, children, }: { title?: string; description?: string; children: React.ReactNode; }) { return (
    {title || description ? (
    {title ? (

    {title}

    ) : null} {description ? (

    {description}

    ) : null}
    ) : null}
    {children}
    ); } /** A label/description + trailing action row (used inside control lists, * e.g. the account page's connect / verify / change-password rows). */ export function Row({ icon, label, description, action, }: { icon?: React.ReactNode; label: string; description?: string; action: React.ReactNode; }) { return (
  • {icon ? {icon} : null} {label}
    {description ? (

    {description}

    ) : null}
    {action}
  • ); }