@openshift-migration-advisor/shared-components 0.29.0-8024400889ad → 0.30.0-a50663eb4616

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureStatusBadge.d.ts","sourceRoot":"","sources":["../../src/report/FeatureStatusBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAkB1D,CAAC"}
1
+ {"version":3,"file":"FeatureStatusBadge.d.ts","sourceRoot":"","sources":["../../src/report/FeatureStatusBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA0B1D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Label } from "@patternfly/react-core";
2
+ import { Icon, Label } from "@patternfly/react-core";
3
3
  import { CheckCircleIcon, TimesCircleIcon } from "@patternfly/react-icons";
4
4
  export const FeatureStatusBadge = ({ status }) => {
5
5
  if (status === "unknown") {
@@ -8,6 +8,6 @@ export const FeatureStatusBadge = ({ status }) => {
8
8
  if (status === "enabled") {
9
9
  return (_jsx(Label, { color: "green", isCompact: true, icon: _jsx(CheckCircleIcon, {}), children: "Enabled" }));
10
10
  }
11
- return (_jsx(Label, { variant: "outline", isCompact: true, icon: _jsx(TimesCircleIcon, {}), children: "Disabled" }));
11
+ return (_jsx(Label, { variant: "outline", isCompact: true, icon: _jsx(Icon, { status: "danger", children: _jsx(TimesCircleIcon, {}) }), children: "Disabled" }));
12
12
  };
13
13
  FeatureStatusBadge.displayName = "FeatureStatusBadge";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/shared-components",
3
- "version": "0.29.0-8024400889ad",
3
+ "version": "0.30.0-a50663eb4616",
4
4
  "description": "Shared React UI components for Migration Advisor apps (report charts, forms, OS support tiers)",
5
5
  "author": "Montse Ortega <mortegag@redhat.com>",
6
6
  "license": "Apache-2.0",
@@ -1,4 +1,4 @@
1
- import { Label } from "@patternfly/react-core";
1
+ import { Icon, Label } from "@patternfly/react-core";
2
2
  import { CheckCircleIcon, TimesCircleIcon } from "@patternfly/react-icons";
3
3
  import type { FC } from "react";
4
4
  import type { FeatureStatus } from "./infrastructureSummaryModel.js";
@@ -21,7 +21,15 @@ export const FeatureStatusBadge: FC<FeatureStatusBadgeProps> = ({ status }) => {
21
21
  }
22
22
 
23
23
  return (
24
- <Label variant="outline" isCompact icon={<TimesCircleIcon />}>
24
+ <Label
25
+ variant="outline"
26
+ isCompact
27
+ icon={
28
+ <Icon status="danger">
29
+ <TimesCircleIcon />
30
+ </Icon>
31
+ }
32
+ >
25
33
  Disabled
26
34
  </Label>
27
35
  );
@@ -189,19 +189,19 @@ describe("ClustersOverview", () => {
189
189
 
190
190
  expect(screen.queryByTestId("clusters-donut")).not.toBeInTheDocument();
191
191
  expect(screen.getByText("8")).toHaveStyle({
192
- background: chart_color_blue_300.value,
192
+ backgroundColor: chart_color_blue_300.value,
193
193
  });
194
194
  expect(screen.getByText("4.25")).toHaveStyle({
195
- background: chart_color_purple_300.value,
195
+ backgroundColor: chart_color_purple_300.value,
196
196
  });
197
197
  expect(screen.getByText("3.5")).toHaveStyle({
198
- background: chart_color_purple_100.value,
198
+ backgroundColor: chart_color_purple_100.value,
199
199
  });
200
200
  expect(screen.getByText("2")).toHaveStyle({
201
- background: chart_color_teal_200.value,
201
+ backgroundColor: chart_color_teal_200.value,
202
202
  });
203
203
  expect(screen.getByText("1")).toHaveStyle({
204
- background: chart_color_yellow_400.value,
204
+ backgroundColor: chart_color_yellow_400.value,
205
205
  });
206
206
  expect(screen.queryByText("0.5")).not.toBeInTheDocument();
207
207
  expect(screen.getByText("Cluster 1 (8)")).toBeInTheDocument();