import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; interface NotificationErrorAlertProps { error: string | null; onRetry?: () => void; onDismiss?: () => void; } export const NotificationErrorAlert: React.FC = ({ error, onRetry, onDismiss, }) => { if (!error) return null; return ( 通知提醒 {error} {onRetry && ( 重试 )} {onDismiss && ( 忽略 )} ); }; const styles = StyleSheet.create({ container: { backgroundColor: '#FEF2F2', borderLeftWidth: 4, borderLeftColor: '#EF4444', marginHorizontal: 20, marginVertical: 8, borderRadius: 8, }, content: { padding: 12, }, title: { fontSize: 14, fontWeight: '600', color: '#DC2626', marginBottom: 4, }, message: { fontSize: 13, color: '#7F1D1D', marginBottom: 8, lineHeight: 18, }, actions: { flexDirection: 'row', gap: 8, }, button: { paddingHorizontal: 12, paddingVertical: 6, backgroundColor: '#DC2626', borderRadius: 6, }, dismissButton: { backgroundColor: '#9CA3AF', }, buttonText: { fontSize: 12, fontWeight: '500', color: '#FFFFFF', }, });