managarten/apps-archived/memoro/apps/mobile/components/atoms/ThemedStatusBar.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

45 lines
1.3 KiB
TypeScript

import React, { useMemo } from 'react';
import { StatusBar } from 'expo-status-bar';
import { Platform } from 'react-native';
import { useTheme } from '~/features/theme/ThemeProvider';
import colors from '~/tailwind.config.js';
/**
* ThemedStatusBar component
*
* A global StatusBar component that automatically matches the header background color
* based on the current theme variant and dark mode setting.
*/
const ThemedStatusBar: React.FC = () => {
const { isDark, themeVariant } = useTheme();
// Get the header background color from theme config
const headerBackgroundColor = useMemo(
() =>
isDark
? colors.theme.extend.colors.dark[themeVariant].menuBackground
: colors.theme.extend.colors[themeVariant].menuBackground,
[isDark, themeVariant]
);
// Determine status bar style based on background color brightness
const statusBarStyle = useMemo(() => {
// For dark mode, use light content (white text/icons)
if (isDark) {
return 'light';
}
// For light mode, use dark content (dark text/icons)
return 'dark';
}, [isDark]);
return (
<StatusBar
style={statusBarStyle}
backgroundColor={Platform.OS === 'android' ? headerBackgroundColor : undefined}
translucent={Platform.OS === 'android'}
/>
);
};
export default ThemedStatusBar;