Skip to content

4.x support icon enums #49

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

Merged
merged 1 commit into from
Jun 21, 2025
Merged

4.x support icon enums #49

merged 1 commit into from
Jun 21, 2025

Conversation

CodeWithDennis
Copy link
Owner

This pull request introduces updates to the HasIcon trait in src/Components/Concerns/HasIcon.php to enhance flexibility by supporting BackedEnum types for icons. The changes improve type safety and expand the range of values that can be used for icons and icon animations.

Updates to HasIcon trait:

  • Support for BackedEnum in icon definitions:

    • Added BackedEnum as a valid type for the $icon property and the icon method parameters. ([src/Components/Concerns/HasIcon.phpR5-R16](https://github.com/CodeWithDennis/filament-simple-alert/pull/49/files#diff-aa1d2065fa873adf077a76dc3cbf3e121746b94b5765731b9a6754c614867f6fR5-R16))
  • Updated return type for getIcon method:

    • Modified the return type of getIcon to include BackedEnum, allowing it to return either a string, BackedEnum, or null. ([src/Components/Concerns/HasIcon.phpL28-R29](https://github.com/CodeWithDennis/filament-simple-alert/pull/49/files#diff-aa1d2065fa873adf077a76dc3cbf3e121746b94b5765731b9a6754c614867f6fL28-R29))

@CodeWithDennis CodeWithDennis merged commit d30b0ca into 4.x Jun 21, 2025
1 check passed
@CodeWithDennis CodeWithDennis deleted the 45-4x-support-heroicon-enums branch June 21, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant