managarten/games/figgos/apps/mobile/components/ErrorMessage.tsx
Till-JS 05d074c57e 🔧 refactor(figgos): restructure to standard monorepo pattern
Migrate figgos from single Expo app to multi-app monorepo structure:
- Move mobile app to apps/mobile/
- Add apps/web/ (SvelteKit) and apps/backend/ (NestJS) scaffolds
- Add packages/shared/ for shared types and constants
- Update root package.json with new dev commands
- Temporarily skip type-check (run pnpm install first)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:27:15 +01:00

52 lines
1 KiB
TypeScript

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { useTheme } from '../utils/ThemeContext';
import FontAwesome from '@expo/vector-icons/FontAwesome';
interface ErrorMessageProps {
message: string;
visible: boolean;
}
const ErrorMessage: React.FC<ErrorMessageProps> = ({ message, visible }) => {
const { theme } = useTheme();
if (!visible) return null;
return (
<View
style={[
styles.container,
{ backgroundColor: theme.colors.error + '20', borderColor: theme.colors.error },
]}
>
<FontAwesome
name="exclamation-circle"
size={16}
color={theme.colors.error}
style={styles.icon}
/>
<Text style={[styles.message, { color: theme.colors.error }]}>{message}</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center',
padding: 12,
borderRadius: 8,
borderWidth: 1,
marginBottom: 15,
},
icon: {
marginRight: 8,
},
message: {
fontSize: 14,
flex: 1,
},
});
export default ErrorMessage;