forked from Tadrisino/MathApp_frontend
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user