[de9ba9]: / breast-cancer-rag-app / frontend / src / components / StatusIndicator.js

Download this file

22 lines (19 with data), 634 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
const StatusIndicator = ({ status }) => {
const statusMap = {
'ready': { text: 'System Ready', color: 'green' },
'checking': { text: 'Checking System...', color: 'orange' },
'error': { text: 'System Error', color: 'red' }
};
return (
<div className="status-indicator">
<span
className="status-dot"
style={{ backgroundColor: statusMap[status]?.color || 'gray' }}
aria-label={`System status: ${status}`}
/>
<span className="status-text">{statusMap[status]?.text || 'Unknown Status'}</span>
</div>
);
};
export default StatusIndicator;