Skip to content

Commit

Permalink
Fix home page filters background color on selected
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Feb 20, 2023
1 parent 19e6a23 commit 5ca7613
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions assets/js/components/HealthSummary/HealthSummaryBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,24 @@ const iconByHealth = {

const styleByHealth = {
passing: (selected, asButton) =>
classNames(
'tn-health-passing w-1/3 px-5 border rounded-lg my-2 mr-4 bg-white',
{
'bg-jungle-green-500 border-green-600 text-white hover:opacity-75':
selected,
'text-jungle-green-500': !selected,
'hover:opacity-75': asButton && !selected,
}
),
classNames('tn-health-passing w-1/3 px-5 border rounded-lg my-2 mr-4', {
'bg-jungle-green-500 border-green-600 text-white hover:opacity-75':
selected,
'text-jungle-green-500 bg-white': !selected,
'hover:opacity-75': asButton && !selected,
}),
warning: (selected, asButton) =>
classNames(
'tn-health-warning w-1/3 px-5 border rounded-lg my-2 mr-4 bg-white',
{
'bg-yellow-400 border-yellow-400 text-white hover:opacity-75': selected,
'text-yellow-400': !selected,
'hover:opacity-75': asButton && !selected,
}
),
classNames('tn-health-warning w-1/3 px-5 border rounded-lg my-2 mr-4', {
'bg-yellow-400 border-yellow-400 text-white hover:opacity-75': selected,
'text-yellow-400 bg-white': !selected,
'hover:opacity-75': asButton && !selected,
}),
critical: (selected, asButton) =>
classNames(
'tn-health-critical w-1/3 px-5 border rounded-lg my-2 mr-4 bg-white',
{
'bg-red-600 border-red-600 text-white hover:opacity-75': selected,
'text-red-600': !selected,
'hover:opacity-75': asButton && !selected,
}
),
classNames('tn-health-critical w-1/3 px-5 border rounded-lg my-2 mr-4', {
'bg-red-600 border-red-600 text-white hover:opacity-75': selected,
'text-red-600 bg-white': !selected,
'hover:opacity-75': asButton && !selected,
}),
};

const labelByHealth = {
Expand Down

0 comments on commit 5ca7613

Please sign in to comment.