Looking for clever conditional styles in MUI5's sx prop. One example I have played with is:
const statusStyle = (status) => {
switch (status) {
case "aborted":
return "#D66460";
break;
case "queue":
return "#6685F0";
break;
case "processing":
return "#F0E666";
break;
default:
return "#60D660";
}
};
<TableRow
key={job.job}
sx={{ color: statusStyle(status) }}
>
But I'm wondering if someone has come up with something more elegant?