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"
|
||||
|
||||
@@ -37,7 +37,8 @@ export function LessonsScreen() {
|
||||
<ScreenHeader
|
||||
title="درسها"
|
||||
subtitle={<>{gradeTitle && <>{gradeTitle}<Sep /></>}اول بخون، بعد آزمونِ جزیره رو بده</>}
|
||||
color="#97C0C0"
|
||||
color="#2FB36B"
|
||||
exact
|
||||
mascot={{ char: 'sigma', mood: 'happy' }}
|
||||
>
|
||||
{home && totalNodes > 0 && (
|
||||
|
||||
@@ -37,7 +37,7 @@ export function SubscriptionScreen() {
|
||||
return (
|
||||
<Screen>
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
<ScreenHeader title="بستهی سوال" subtitle="هر وقت لازم داشتی، سوال بخر" color="#4C5FD5" mascot={{ char: 'pi', mood: 'excited', size: 60 }} />
|
||||
<ScreenHeader title="بستهی سوال" subtitle="هر وقت لازم داشتی، سوال بخر" color="#ED6956" exact mascot={{ char: 'pi', mood: 'excited', size: 60 }} />
|
||||
|
||||
<div className="flex flex-col gap-4 px-4 py-5">
|
||||
<div className="rounded-3xl border border-line bg-white p-4">
|
||||
|
||||
Reference in New Issue
Block a user