mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 09:59:41 +02:00
Projects included: - maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing) - manacore (Expo mobile + SvelteKit web + Astro landing) - manadeck (NestJS backend + Expo mobile + SvelteKit web) - memoro (Expo mobile + SvelteKit web + Astro landing) This commit preserves the current state before monorepo restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
1.6 KiB
TypeScript
34 lines
1.6 KiB
TypeScript
import React from 'react';
|
|
import { View } from 'react-native';
|
|
import { Text } from './Text';
|
|
import { useThemeStore, useIsDark, useCurrentColors, useRootClassName } from '~/store/themeStore';
|
|
import { themes } from '~/themes';
|
|
|
|
export function ThemeDebug() {
|
|
const { theme, mode } = useThemeStore();
|
|
const isDark = useIsDark();
|
|
const currentColors = useCurrentColors();
|
|
const rootClassName = useRootClassName();
|
|
|
|
// Fallback to default theme if currentColors is undefined
|
|
const safeColors = currentColors || themes.default.light;
|
|
|
|
return (
|
|
<View className="m-2 rounded-lg border border-border bg-surface p-4">
|
|
<Text className="mb-2 text-lg font-bold text-foreground">Theme Debug</Text>
|
|
<Text className="text-foreground">Theme: {theme}</Text>
|
|
<Text className="text-foreground">Mode: {mode}</Text>
|
|
<Text className="text-foreground">Is Dark: {isDark ? 'true' : 'false'}</Text>
|
|
<Text className="text-foreground">Root Class: {rootClassName}</Text>
|
|
<Text className="text-foreground">Primary Color: {safeColors.primary}</Text>
|
|
<Text className="text-foreground">Colors undefined: {currentColors ? 'no' : 'yes'}</Text>
|
|
<View className="mt-2 rounded bg-primary p-2">
|
|
<Text className="text-primary-foreground">Primary Background Test</Text>
|
|
</View>
|
|
{/* Test with inline styles */}
|
|
<View className="mt-2 rounded p-2" style={{ backgroundColor: `rgb(${safeColors.primary})` }}>
|
|
<Text style={{ color: `rgb(${safeColors.primaryForeground})` }}>Inline Style Test</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|