Lessons and packages headers: back to the owner's preferred colors (green, coral), exactly as before

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:31:01 +03:30
parent 54bd865835
commit 54b872026d
3 changed files with 7 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ export function ScreenHeader({
color,
back = false,
mascot,
exact = false,
children,
}: {
title: ReactNode;
@@ -22,11 +23,13 @@ export function ScreenHeader({
/** دکمه‌ی بازگشت؛ true یعنی صفحه‌ی قبل در پشته. */
back?: boolean | (() => void);
mascot?: { char: SeyarChar; mood?: SeyarMood; size?: number };
/** رنگ را همان‌طور که هست بگذار (بی‌تیره‌کردن برای کنتراست)؛ انتخابِ مالک برای چند صفحه. */
exact?: boolean;
children?: ReactNode;
}) {
const nav = useNav();
const onBack = typeof back === 'function' ? back : nav.back;
const bg = onWhite(color);
const bg = exact ? color : onWhite(color);
return (
<header
className="relative flex-shrink-0 overflow-hidden rounded-b-[32px] px-5 pb-6 pt-safe text-white"