import type { ReactNode } from "react"; import type { Accent } from "../../core/AlouetteConfig"; import { tv } from "../../core/tv"; import { AccentScope } from "../containers/AccentScope"; import { Icon, type SVGIconElement } from "../primitives/Icon"; import { Text } from "../primitives/Text"; import { View } from "../primitives/View"; const sectionTitleVariants = tv({ slots: { frame: "flex-row items-center gap-xs", icon: "text-muted", title: "font-heading-bold text-lg", }, variants: { accented: { true: { icon: "text-accent", title: "text-accent" }, false: {}, }, }, defaultVariants: { accented: false }, }); export interface SectionTitleProps { children: string; /** Rendered before the title, in the accent's ink or muted without one. */ icon?: SVGIconElement; /** Tints the icon and the title. */ accent?: Accent; /** Heading level announced to assistive tech (an `