Skip to content

Commit

Permalink
feat(Title Block): Add sentimentPositive to surveyStatus (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBaptastic authored Oct 13, 2023
1 parent 0860b51 commit 70c5684
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-trains-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/draft-title-block-zen": patch
---

add sentimentPositive to surveyStatus
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ describe("<TitleBlockZen />", () => {
["live", "statusLive"],
["closed", "statusClosed"],
["scheduled", "statusClosed"],
["sentimentPositive", "sentimentPositive"],
["default", "default"],
])(
"renders tag with correct text and variant when %s status",
async (status, expectedClassName) => {
Expand All @@ -727,6 +729,7 @@ describe("<TitleBlockZen />", () => {
| "live"
| "scheduled"
| "closed"
| "sentimentPositive"
| "default",
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ type TextDirection = "ltr" | "rtl"

type SurveyStatus = {
text: string
status: "draft" | "live" | "scheduled" | "closed" | "default"
status:
| "draft"
| "live"
| "scheduled"
| "closed"
| "sentimentPositive"
| "default"
}

const renderTag = (surveyStatus: SurveyStatus): JSX.Element | void => {
Expand Down Expand Up @@ -238,6 +244,10 @@ const renderTag = (surveyStatus: SurveyStatus): JSX.Element | void => {
tagVariant = "statusClosed"
}

if (surveyStatus.status === "sentimentPositive") {
tagVariant = "sentimentPositive"
}

if (surveyStatus.status === "default") {
tagVariant = "default"
}
Expand Down

0 comments on commit 70c5684

Please sign in to comment.