stlyes fixes
This commit is contained in:
@@ -29,22 +29,22 @@ export const OptimizationScores: React.FC<OptimizationScoresProps> = ({
|
||||
className = '',
|
||||
}) => {
|
||||
const getScoreColor = (score: number) => {
|
||||
if (score >= 80) return 'text-green-600 dark:text-green-400';
|
||||
if (score >= 60) return 'text-yellow-600 dark:text-yellow-400';
|
||||
return 'text-red-600 dark:text-red-400';
|
||||
if (score >= 80) return 'text-success-600 dark:text-success-400';
|
||||
if (score >= 60) return 'text-warning-600 dark:text-warning-400';
|
||||
return 'text-error-600 dark:text-error-400';
|
||||
};
|
||||
|
||||
const getScoreBgColor = (score: number) => {
|
||||
if (score >= 80) return 'bg-green-100 dark:bg-green-900';
|
||||
if (score >= 60) return 'bg-yellow-100 dark:bg-yellow-900';
|
||||
return 'bg-red-100 dark:bg-red-900';
|
||||
if (score >= 80) return 'bg-success-100 dark:bg-success-900';
|
||||
if (score >= 60) return 'bg-warning-100 dark:bg-warning-900';
|
||||
return 'bg-error-100 dark:bg-error-900';
|
||||
};
|
||||
|
||||
const getChangeIcon = (current: number, previous?: number) => {
|
||||
if (!previous) return null;
|
||||
const diff = current - previous;
|
||||
if (diff > 0) return <ArrowUpIcon className="w-4 h-4 text-green-600" />;
|
||||
if (diff < 0) return <ArrowDownIcon className="w-4 h-4 text-red-600" />;
|
||||
if (diff > 0) return <ArrowUpIcon className="w-4 h-4 text-success-600" />;
|
||||
if (diff < 0) return <ArrowDownIcon className="w-4 h-4 text-error-600" />;
|
||||
return <span className="w-4 h-4 text-gray-400">—</span>;
|
||||
};
|
||||
|
||||
@@ -182,7 +182,7 @@ export const OptimizationScores: React.FC<OptimizationScoresProps> = ({
|
||||
{/* Metadata indicators */}
|
||||
<div className="mt-3 flex flex-wrap gap-2 text-xs">
|
||||
{scores.has_cluster_mapping && (
|
||||
<span className="px-2 py-0.5 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded">
|
||||
<span className="px-2 py-0.5 bg-brand-100 dark:bg-brand-900 text-brand-800 dark:text-brand-200 rounded">
|
||||
Cluster
|
||||
</span>
|
||||
)}
|
||||
@@ -192,7 +192,7 @@ export const OptimizationScores: React.FC<OptimizationScoresProps> = ({
|
||||
</span>
|
||||
)}
|
||||
{scores.has_attributes && (
|
||||
<span className="px-2 py-0.5 bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 rounded">
|
||||
<span className="px-2 py-0.5 bg-success-100 dark:bg-success-900 text-success-800 dark:text-success-200 rounded">
|
||||
Attributes
|
||||
</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user