xenecode's picture
Claude Opus 5.5
Translate frontend and backend text to English
6c68d01
Raw History Blame Contribute Delete
971 Bytes
import React from 'react';
const TONES = {
neutral: 'text-hmi-text',
ok: 'text-hmi-ok',
err: 'text-hmi-err',
warn: 'text-hmi-warn',
accent: 'text-hmi-accent',
};
const StatusCard = ({ title, value, isBoolean = false, tone, className = '' }) => {
const displayValue = isBoolean ? (value ? 'Yes' : 'No') : (value ?? '—');
const resolvedTone = tone || (isBoolean ? (value ? 'ok' : 'err') : 'neutral');
return (
<div className={`border border-hmi-line bg-hmi-panel px-4 py-3 ${className}`}>
<div className="text-[11px] font-medium uppercase tracking-[0.12em] text-hmi-muted">{title}</div>
<div className={`mt-1.5 flex items-center gap-2 font-mono text-2xl font-semibold tabular-nums ${TONES[resolvedTone]}`}>
{isBoolean && (
<span className={`h-2.5 w-2.5 shrink-0 ${value ? 'bg-hmi-ok' : 'bg-hmi-err'}`} aria-hidden="true" />
)}
{displayValue}
</div>
</div>
);
};
export default StatusCard;