-
Couldn't load subscription status.
- Fork 6
Fix IconPrefix type
#2812
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
base: main
Are you sure you want to change the base?
Fix IconPrefix type
#2812
Conversation
🦋 Changeset detectedLatest commit: cc3634e The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the IconPrefix type definition to make it more flexible and future-proof. Instead of maintaining an exhaustive list of FontAwesome icon prefixes, the type now uses a template literal type that accepts any string starting with "fa".
- Changed
IconPrefixfrom a union of 37 specific prefix literals to a flexible template literal typefa${string} - Updated the comment to clarify the reasoning behind this change
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/components/icon/src/models.ts | Replaced exhaustive union type with flexible template literal type for IconPrefix |
| .changeset/modern-trees-hammer.md | Added changeset documenting the patch-level change |
🕸 Website previewYou can view a preview here (commit |
🕸 Storybook previewYou can view a preview here (commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Fixes #2786