mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:21:08 +02:00
- Rename barbiebox to figgos and integrate into monorepo - Remove separate git repository - Update package name to @figgos/game - Add dev scripts (figgos:dev, dev:figgos:ios, dev:figgos:android) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
1 KiB
TypeScript
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;
|