Skip to content

Commit 6d42a62

Browse files
Add safelist configuration for Tailwind CSS animation classes
1 parent ddd6855 commit 6d42a62

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ Make sure you add the following to your `tailwind.config.js file.
2323
'./vendor/codewithdennis/filament-simple-alert/resources/**/*.blade.php',
2424
```
2525

26+
Also, add the following safelist configuration to your `tailwind.config.js` to ensure animation classes are not purged:
27+
28+
```js
29+
module.exports = {
30+
// ... other config
31+
safelist: [
32+
'animate-spin',
33+
'animate-pulse',
34+
'animate-bounce'
35+
],
36+
}
37+
```
38+
2639
### Custom Theme
2740

2841
You will need to [create a custom theme](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) for the styles to be applied correctly.
@@ -79,11 +92,11 @@ SimpleAlert::make('example')
7992

8093
#### Icon Animation
8194

82-
You can add animation to the icon by passing the animation type as the second parameter to the `icon` method. You can use the `IconAnimation` enum to specify the animation type. The available animations are `Spin`, `Pulse`, and `Bounce`.
95+
You can add animation to the icon by passing the animation type as the second parameter to the `icon` method. Make sure to use the `IconAnimation` enum for the animation type.
8396

8497
```php
8598
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
86-
use CodeWithDennis\SimpleAlert\Enums\IconAnimation;
99+
use CodeWithDennis\SimpleAlert\Components\Enums\IconAnimation;
87100

88101
SimpleAlert::make('example')
89102
->icon('heroicon-s-arrow-path', IconAnimation::Spin)

0 commit comments

Comments
 (0)