diff --git a/.changeset/green-vans-fold.md b/.changeset/green-vans-fold.md new file mode 100644 index 00000000000..e9b75386c4b --- /dev/null +++ b/.changeset/green-vans-fold.md @@ -0,0 +1,5 @@ +--- +"@kaizen/components": patch +--- + +Add sentimentPositive TitleBlockZen fix from kaizen-legacy diff --git a/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx b/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx index 1c2bb98e85f..891923cb0b5 100644 --- a/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx +++ b/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx @@ -712,6 +712,8 @@ describe("", () => { ["live", "statusLive"], ["closed", "statusClosed"], ["scheduled", "statusClosed"], + ["sentimentPositive", "sentimentPositive"], + ["default", "default"], ])( "renders tag with correct text and variant when %s status", async (status, expectedClassName) => { @@ -725,6 +727,7 @@ describe("", () => { | "live" | "scheduled" | "closed" + | "sentimentPositive" | "default", }} > diff --git a/packages/components/src/TitleBlockZen/TitleBlockZen.tsx b/packages/components/src/TitleBlockZen/TitleBlockZen.tsx index 46d046b8ba5..f7b8489abc7 100644 --- a/packages/components/src/TitleBlockZen/TitleBlockZen.tsx +++ b/packages/components/src/TitleBlockZen/TitleBlockZen.tsx @@ -51,6 +51,10 @@ const renderTag = (surveyStatus: SurveyStatus): JSX.Element | void => { tagVariant = "statusClosed" } + if (surveyStatus.status === "sentimentPositive") { + tagVariant = "sentimentPositive" + } + if (surveyStatus.status === "default") { tagVariant = "default" } diff --git a/packages/components/src/TitleBlockZen/types.ts b/packages/components/src/TitleBlockZen/types.ts index 52743cf22f8..a9e174ee41f 100644 --- a/packages/components/src/TitleBlockZen/types.ts +++ b/packages/components/src/TitleBlockZen/types.ts @@ -181,7 +181,13 @@ export type TextDirection = "ltr" | "rtl" export type SurveyStatus = { text: string - status: "draft" | "live" | "scheduled" | "closed" | "default" + status: + | "draft" + | "live" + | "scheduled" + | "closed" + | "sentimentPositive" + | "default" } export type TitleBlockBreadcrumbType = {