5 лаба
This commit is contained in:
13
Lab/src/components/StatusLabel.jsx
Normal file
13
Lab/src/components/StatusLabel.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
function StatusLabel({ statusName }) {
|
||||
let className = "fw-bold ";
|
||||
switch ((statusName || "").toLowerCase()) {
|
||||
case "вышла": className += "text-success"; break;
|
||||
case "не вышла": className += "text-danger"; break;
|
||||
case "не переведена": className += "text-warning"; break;
|
||||
case "прочитана": className += "text-primary"; break;
|
||||
default: className += "text-muted";
|
||||
}
|
||||
return <span className={className}>Статус: {statusName || "Неизвестен"}</span>
|
||||
}
|
||||
export default StatusLabel;
|
||||
|
||||
Reference in New Issue
Block a user