import type { ReactNode } from "react"; type SettingsSectionProps = { icon?: ReactNode; title: string; titleAccessory?: ReactNode; description?: string; action?: ReactNode; children: ReactNode; }; export function SettingsSection({ icon, title, titleAccessory, description, action, children, }: SettingsSectionProps) { return (
{/* Stack the action row under the title on narrow screens instead of squeezing both onto one line; shrink-0 keeps the actions from being compressed by a long description when side by side. */}

{icon} {title}

{titleAccessory}
{description &&

{description}

}
{action &&
{action}
}
{children}
); }