- Add ThemeStore (Zustand) for reactive theme switching - Add Themes.tsx with THEMES object (defaultLight, defaultDark) - Add Settings screen with theme switcher and logout button - Add BaseButton component for reusable themed buttons - Migrate all components from static currentTheme to useThemeStore() - Add shadowColor to theme (iOS only, Android uses elevation) - All text elements now use theme colors (textPrimary, textSecondary, etc.) - Update tab navigation to include Settings tab - Move logout from Header to Settings screen
25 lines
512 B
TypeScript
25 lines
512 B
TypeScript
import { View } from "react-native";
|
|
import { useThemeStore } from "../stores/ThemeStore";
|
|
import { ReactNode } from "react";
|
|
|
|
type BaseBackgroundProps = {
|
|
children?: ReactNode;
|
|
className?: string;
|
|
};
|
|
|
|
const BaseBackground = (props: BaseBackgroundProps) => {
|
|
const { theme } = useThemeStore();
|
|
return (
|
|
<View
|
|
className={`h-full ${props.className}`}
|
|
style={{
|
|
backgroundColor: theme.primeBg,
|
|
}}
|
|
>
|
|
{props.children}
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default BaseBackground;
|