'use client' import { useThemeStyles, useTheme, cn } from '@/lib/ui-styles' interface ErrorStateProps { message: string onRetry?: () => void retryLabel?: string className?: string } export default function ErrorState({ message, onRetry, retryLabel = '重试', className, }: ErrorStateProps) { const styles = useThemeStyles() const theme = useTheme() // 根据主题选择错误状态的颜色 const errorBg = theme === 'dark' ? 'bg-red-900/30' : 'bg-red-50' const errorBorder = theme === 'dark' ? 'border-red-800' : 'border-red-200' const errorText = theme === 'dark' ? 'text-red-300' : 'text-red-700' return (
错误: {message}
{onRetry && ( )}
) }