fix incorrectly rendering indicators statuses

This commit is contained in:
Dexter 2022-04-04 09:22:44 +01:00
parent bb0cf7f575
commit 3aabb0facf
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ export const TableRow = ({
? goodThreshold(value)
? TailwindIntents.Success
: TailwindIntents.Danger
: TailwindIntents.Help,
: TailwindIntents.Highlight,
[goodThreshold, value]
);
return (
@ -30,7 +30,7 @@ export const TableRow = ({
{formatter ? formatter(value) : defaultFieldFormatter(value)}
</td>
<td className="py-4 px-8">
<Indicator variant={TailwindIntents.Success} />
<Indicator variant={variant} />
</td>
</tr>
</Tooltip>

View File

@ -30,12 +30,12 @@ export const getIntentShadow = (intent?: Intent) => {
};
export const getVariantBackground = (variant?: TailwindIntents) => {
return classNames({
return {
'bg-intent-danger text-white': variant === TailwindIntents.Danger,
'bg-intent-warning text-black': variant === TailwindIntents.Warning,
'bg-intent-prompt text-black': variant === TailwindIntents.Prompt,
'bg-intent-success text-black': variant === TailwindIntents.Success,
'bg-intent-help text-white': variant === TailwindIntents.Help,
'bg-intent-highlight text-black': variant === TailwindIntents.Highlight,
});
};
};