neues Admin UI Layout eingeführt. Alle Tests auf den neusten Stand gebracht.
This commit is contained in:
@@ -3,8 +3,8 @@ import { ChevronLeft } from 'lucide-react';
|
||||
import { YStack, XStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { Pressable } from '@tamagui/react-native-web-lite';
|
||||
import { useTheme } from '@tamagui/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAdminTheme } from '../theme';
|
||||
|
||||
type OnboardingShellProps = {
|
||||
eyebrow?: string;
|
||||
@@ -30,12 +30,7 @@ export function OnboardingShell({
|
||||
skipLabel,
|
||||
}: OnboardingShellProps) {
|
||||
const { t } = useTranslation('onboarding');
|
||||
const theme = useTheme();
|
||||
const background = String(theme.background?.val ?? '#f7f8fb');
|
||||
const surface = String(theme.surface?.val ?? '#ffffff');
|
||||
const text = String(theme.color?.val ?? '#111827');
|
||||
const muted = String(theme.gray?.val ?? '#6b7280');
|
||||
const border = String(theme.borderColor?.val ?? '#e5e7eb');
|
||||
const { background, surface, text, textStrong, muted, border, shadow } = useAdminTheme();
|
||||
const resolvedBackLabel = backLabel ?? t('layout.back', 'Back');
|
||||
const resolvedSkipLabel = skipLabel ?? t('layout.skip', 'Skip');
|
||||
|
||||
@@ -55,7 +50,7 @@ export function OnboardingShell({
|
||||
>
|
||||
<XStack alignItems="center" justifyContent="space-between">
|
||||
{onBack ? (
|
||||
<Pressable onPress={onBack} aria-label="Back">
|
||||
<Pressable onPress={onBack} aria-label={resolvedBackLabel}>
|
||||
<XStack alignItems="center" space="$1.5">
|
||||
<ChevronLeft size={22} color={text} />
|
||||
<Text fontSize="$sm" fontWeight="700" color={text}>
|
||||
@@ -68,7 +63,7 @@ export function OnboardingShell({
|
||||
)}
|
||||
|
||||
{onSkip ? (
|
||||
<Pressable onPress={onSkip} aria-label="Skip">
|
||||
<Pressable onPress={onSkip} aria-label={resolvedSkipLabel}>
|
||||
<Text fontSize="$sm" fontWeight="700" color={muted}>
|
||||
{resolvedSkipLabel}
|
||||
</Text>
|
||||
@@ -84,7 +79,7 @@ export function OnboardingShell({
|
||||
borderWidth={1}
|
||||
borderColor={border}
|
||||
backgroundColor={surface}
|
||||
shadowColor="#0f172a"
|
||||
shadowColor={shadow}
|
||||
shadowOpacity={0.06}
|
||||
shadowRadius={14}
|
||||
shadowOffset={{ width: 0, height: 8 }}
|
||||
@@ -95,7 +90,7 @@ export function OnboardingShell({
|
||||
{eyebrow}
|
||||
</Text>
|
||||
) : null}
|
||||
<Text fontSize="$xl" fontWeight="900" color={text}>
|
||||
<Text fontSize="$xl" fontWeight="900" color={textStrong}>
|
||||
{title}
|
||||
</Text>
|
||||
{subtitle ? (
|
||||
|
||||
Reference in New Issue
Block a user