mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 05:41:09 +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>
31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
import { useCurrentColors } from '~/store/themeStore';
|
|
import { themes } from '~/themes';
|
|
|
|
export function useThemeColors() {
|
|
const currentColors = useCurrentColors();
|
|
|
|
// Fallback to default theme if currentColors is undefined
|
|
const safeColors = currentColors || themes.default.light;
|
|
|
|
return {
|
|
// Convert RGB strings to hex for React Native compatibility
|
|
background: `rgb(${safeColors.background})`,
|
|
foreground: `rgb(${safeColors.foreground})`,
|
|
card: `rgb(${safeColors.surface})`, // Use surface color for cards
|
|
surface: `rgb(${safeColors.surface})`,
|
|
surfaceElevated: `rgb(${safeColors.surfaceElevated})`,
|
|
muted: `rgb(${safeColors.muted})`,
|
|
mutedForeground: `rgb(${safeColors.mutedForeground})`,
|
|
primary: `rgb(${safeColors.primary})`,
|
|
primaryForeground: `rgb(${safeColors.primaryForeground})`,
|
|
secondary: `rgb(${safeColors.secondary})`,
|
|
secondaryForeground: `rgb(${safeColors.secondaryForeground})`,
|
|
accent: `rgb(${safeColors.accent})`,
|
|
accentForeground: `rgb(${safeColors.accentForeground})`,
|
|
destructive: `rgb(${safeColors.destructive})`,
|
|
destructiveForeground: `rgb(${safeColors.destructiveForeground})`,
|
|
border: `rgb(${safeColors.border})`,
|
|
input: `rgb(${safeColors.input})`,
|
|
ring: `rgb(${safeColors.ring})`,
|
|
};
|
|
}
|