Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Officially add null as Badge status option #2612

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-terms-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': minor
---

Signal support for null in Badge status prop
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- id: typescript-cache
name: Restore TypeScript cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: |
packages/*/build/ts
Expand All @@ -31,7 +31,7 @@ jobs:

- id: jest-cache
name: Restore jest cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: .loom/cache/jest/
key: ${{ runner.os }}-jest-v1-${{ github.sha }}
Expand All @@ -50,7 +50,7 @@ jobs:

- id: eslint-cache
name: Restore ESLint cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: .loom/cache/eslint
key: ${{ runner.os }}-eslint-v1-${{ github.sha }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type BadgeVariant =
| 'success'
| 'highlight';

export type BadgeStatus = 'empty' | 'partial' | 'complete';
export type BadgeStatus = 'empty' | 'partial' | 'complete' | null;

/**
* @property text - The text displayed inside the badge.
Expand All @@ -26,7 +26,7 @@ export interface BadgeProps {
variant: BadgeVariant;

/**
* A circle icon displaying the status of the badge.
* A circle icon displaying the status of the badge. Use `null` to hide the status icon.
*/
status?: BadgeStatus;
}
Expand Down