import { AlertCircle } from 'lucide-react'; import { useI18n } from '@/utils/chromeI18n'; import { cn } from '@/lib/utils'; interface ErrorDisplayProps extends React.HTMLAttributes { error: string; } export default function ErrorDisplay({ error, className, ...props }: ErrorDisplayProps) { const { t } = useI18n('storageCleaner'); return ( // 1. 精简层级:单层外壳直接搞定居中、响应式高度与外部类名扩展
{/* 2. 核心卡片容器: - 彻底放弃 bg-red-50,改用标准的 bg-destructive/5(3%~5% 透明度的系统危险色)。 - 边框改为 border-destructive/20。 - 这样在黑夜模式下会自动完美混色,绝不刺眼。 */}
{/* 3. 图标与主要错误信息全面对接 text-destructive 语义色 */}

{error}

{/* 次要提示文本维持柔和的中性高级灰 */}

{t('storageCleaner:errorStandardOnly')}

); }