managarten/picture/apps/mobile/components/ErrorBanner.tsx
Till-JS c712a2504a feat: integrate uload and picture, unify package naming
- Add uload project with apps/web structure
  - Reorganize from flat to monorepo structure
  - Remove PocketBase binary and local data
  - Update to pnpm and @uload/web namespace

- Add picture project to monorepo
  - Remove embedded git repository

- Unify all package names to @{project}/{app} schema:
  - @maerchenzauber/* (was @storyteller/*)
  - @manacore/* (was manacore-*, manacore)
  - @manadeck/* (was web, backend, manadeck)
  - @memoro/* (was memoro-web, landing, memoro)
  - @picture/* (already unified)
  - @uload/web

- Add convenient dev scripts for all apps:
  - pnpm dev:{project}:web
  - pnpm dev:{project}:landing
  - pnpm dev:{project}:mobile
  - pnpm dev:{project}:backend

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 04:00:36 +01:00

40 lines
1.1 KiB
TypeScript

import { View, Pressable } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { Text } from './Text';
import { useTheme } from '~/contexts/ThemeContext';
type ErrorBannerProps = {
message: string;
onDismiss: () => void;
};
export function ErrorBanner({ message, onDismiss }: ErrorBannerProps) {
const { theme } = useTheme();
return (
<View
style={{
position: 'absolute',
top: 60,
left: 16,
right: 16,
backgroundColor: theme.colors.error || '#ef4444',
borderRadius: 12,
padding: 16,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
zIndex: 1000,
...theme.shadows.lg,
}}
>
<View style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }}>
<Ionicons name="alert-circle" size={20} color="white" style={{ marginRight: 12 }} />
<Text style={{ color: 'white', flex: 1 }}>{message}</Text>
</View>
<Pressable onPress={onDismiss} hitSlop={8}>
<Ionicons name="close" size={20} color="white" />
</Pressable>
</View>
);
}