mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 09:01:09 +02:00
Move these apps to apps-archived/ as they are not actively developed: - inventory: Inventory management app - presi: Presentation tool - storage: Cloud storage app These can be reactivated by moving back to apps/ when needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Portable Theme Module
Dieses Modul enthält ein komplettes Theme-System für React Native Apps mit:
- Hell/Dunkel Modus (inkl. System-Einstellung)
- Kontrast-Einstellungen (5 Stufen)
- Theme Provider & Hooks
- Fertige UI-Komponenten für Theme-Einstellungen
Installation
- Kopiere den gesamten
themeOrdner in dein Projekt - Installiere die benötigten Dependencies:
npm install @react-native-async-storage/async-storage
Verwendung
- Wrapp deine App mit dem ThemeProvider:
import { ThemeProvider } from './theme';
export default function App() {
return (
<ThemeProvider>
<YourApp />
</ThemeProvider>
);
}
- Nutze den useTheme Hook in deinen Komponenten:
import { useTheme } from './theme';
export function MyComponent() {
const { theme, isDark } = useTheme();
return (
<View style={{ backgroundColor: theme.colors.background }}>
<Text style={{ color: theme.colors.text }}>Hello World</Text>
</View>
);
}
- Füge die ThemeSettings Komponente in deine Settings-Seite ein:
import { ThemeSettings } from './theme';
export function SettingsScreen() {
return (
<View>
<ThemeSettings />
</View>
);
}