Skip to content

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.

2 participants