mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 19:16:08 +00:00
fix(demo): the phone welcome scales with the text size and is paired with the desktop one
MDemoWelcome used raw rem sizes, which ignore the text size setting and broke theme:lint, and was missing from feature-pairs.json, which broke lint:pairs.
This commit is contained in:
@@ -669,6 +669,12 @@
|
||||
"desktop": ["src/components/Roadtrip/RoadtripStayModal.tsx"],
|
||||
"mobile": ["src/mobile/screens/trip/roadtrip/MRtStaySheet.tsx"]
|
||||
},
|
||||
{
|
||||
"feature": "Demo welcome",
|
||||
"hooks": ["src/components/Demo/useDemoWelcome.ts"],
|
||||
"desktop": ["src/components/Demo/DemoWelcome.tsx"],
|
||||
"mobile": ["src/mobile/screens/dashboard/MDemoWelcome.tsx"]
|
||||
},
|
||||
{
|
||||
"feature": "Settings / Demo account locks",
|
||||
"hooks": ["src/components/Demo/useDemoLock.ts"],
|
||||
|
||||
@@ -25,7 +25,7 @@ function Lines({ lines, accent, t }: { lines: readonly DemoLine[]; accent?: bool
|
||||
return (
|
||||
<ul className={`${CARD} m-0 flex list-none flex-col gap-2 p-3`}>
|
||||
{lines.map(({ icon: Icon, labelKey }) => (
|
||||
<li key={labelKey} className="flex items-center gap-2.5 text-[0.78125rem] text-m-ink">
|
||||
<li key={labelKey} className="flex items-center gap-2.5 text-[length:calc(12.5px*var(--fs-scale-body,1))] text-m-ink">
|
||||
<Icon
|
||||
size={15}
|
||||
strokeWidth={2}
|
||||
@@ -42,13 +42,13 @@ function Lines({ lines, accent, t }: { lines: readonly DemoLine[]; accent?: bool
|
||||
function Welcome({ t }: { t: Translate }) {
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<p className="m-0 text-[0.8125rem] leading-snug text-m-muted">{t('demo.welcome.tagline')}</p>
|
||||
<p className="m-0 text-[length:calc(13px*var(--fs-scale-body,1))] leading-snug text-m-muted">{t('demo.welcome.tagline')}</p>
|
||||
|
||||
<div className="flex items-start gap-2.5 rounded-[18px] bg-warning-soft px-3.5 py-3">
|
||||
<RotateCcw size={16} strokeWidth={2.2} className="mt-0.5 flex-none text-warning" aria-hidden />
|
||||
<div className="min-w-0">
|
||||
<div className="text-[0.8125rem] font-semibold text-m-ink">{t('demo.welcome.resetTitle')}</div>
|
||||
<p className="m-0 mt-0.5 text-[0.75rem] leading-snug text-m-muted">{t('demo.welcome.resetBody')}</p>
|
||||
<div className="text-[length:calc(13px*var(--fs-scale-body,1))] font-semibold text-m-ink">{t('demo.welcome.resetTitle')}</div>
|
||||
<p className="m-0 mt-0.5 text-[length:calc(12px*var(--fs-scale-caption,1))] leading-snug text-m-muted">{t('demo.welcome.resetBody')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -61,8 +61,8 @@ function Welcome({ t }: { t: Translate }) {
|
||||
<Icon size={15} strokeWidth={2} aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0">
|
||||
<div className="text-[0.8125rem] font-semibold text-m-ink">{t(titleKey)}</div>
|
||||
<p className="m-0 text-[0.71875rem] leading-snug text-m-muted">{t(bodyKey)}</p>
|
||||
<div className="text-[length:calc(13px*var(--fs-scale-body,1))] font-semibold text-m-ink">{t(titleKey)}</div>
|
||||
<p className="m-0 text-[length:calc(11.5px*var(--fs-scale-caption,1))] leading-snug text-m-muted">{t(bodyKey)}</p>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
@@ -140,7 +140,7 @@ export default function MDemoWelcome() {
|
||||
{t('demo.welcome.start')}
|
||||
<ArrowRight size={15} strokeWidth={2.2} className="rtl:-scale-x-100" aria-hidden />
|
||||
</button>
|
||||
<div className="flex items-center justify-center gap-5 text-[0.75rem] font-medium text-m-muted">
|
||||
<div className="flex items-center justify-center gap-5 text-[length:calc(12px*var(--fs-scale-caption,1))] font-medium text-m-muted">
|
||||
<a
|
||||
href={TREK_REPO_URL}
|
||||
target="_blank"
|
||||
|
||||
Reference in New Issue
Block a user