Files
pwap/mobile/src/__mocks__/contexts/ThemeContext.tsx
T
pezkuwichain 24d6a942f8 refactor(mobile): Remove i18n, expand core screens, update plan
BREAKING: Removed multi-language support (i18n) - will be re-added later

Changes:
- Removed i18n system (6 language files, LanguageContext)
- Expanded WalletScreen, SettingsScreen, SwapScreen with more features
- Added KurdistanSun component, HEZ/PEZ token icons
- Added EditProfileScreen, WalletSetupScreen
- Added button e2e tests (Profile, Settings, Wallet)
- Updated plan: honest assessment - 42 nav buttons with mock data
- Fixed terminology: Polkadot→Pezkuwi, Substrate→Bizinikiwi

Reality check: UI complete with mock data, converting to production one-by-one
2026-01-15 05:08:21 +03:00

44 lines
1.2 KiB
TypeScript

import React, { createContext, useContext, ReactNode } from 'react';
// Mock colors instead of importing from shared
const LightColors = {
background: '#F5F5F5',
surface: '#FFFFFF',
text: '#000000',
textSecondary: '#666666',
border: '#E0E0E0',
};
// Mock Theme Context for testing
interface ThemeContextType {
isDarkMode: boolean;
toggleDarkMode: () => Promise<void>;
colors: typeof LightColors;
fontSize: 'small' | 'medium' | 'large';
setFontSize: (size: 'small' | 'medium' | 'large') => Promise<void>;
fontScale: number;
}
export const mockThemeContext: ThemeContextType = {
isDarkMode: false,
toggleDarkMode: jest.fn().mockResolvedValue(undefined),
colors: LightColors,
fontSize: 'medium',
setFontSize: jest.fn().mockResolvedValue(undefined),
fontScale: 1,
};
const ThemeContext = createContext<ThemeContextType>(mockThemeContext);
export const MockThemeProvider: React.FC<{ children: ReactNode; value?: Partial<ThemeContextType> }> = ({
children,
value = {}
}) => {
const contextValue = { ...mockThemeContext, ...value };
return <ThemeContext.Provider value={contextValue}>{children}</ThemeContext.Provider>;
};
export const useTheme = () => useContext(ThemeContext);
export default ThemeContext;