mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Update 05-customizing-notifications.md
This commit is contained in:
@@ -10,6 +10,15 @@ Notifications come fully styled out of the box. However, if you want to apply yo
|
||||
|
||||
Notifications have dedicated CSS classes you can hook into to apply your own styling. Open the inspector in your browser to find out which classes you need to target.
|
||||
|
||||
## Positioning notifications
|
||||
|
||||
You can configure the alignment of the notifications with a service provider, for example adding the below to the boot method on: AppServiceProvider.php would align the notifications top middle of the browser.
|
||||
|
||||
```php
|
||||
Notifications::alignment(Alignment::Center);
|
||||
Notifications::verticalAlignment(VerticalAlignment::Start);
|
||||
```
|
||||
|
||||
## Using a custom notification view
|
||||
|
||||
If your desired customization can't be achieved using the CSS classes above, you can create a custom view to render the notification. To configure the notification view, call the static `configureUsing()` method inside a service provider's `boot()` method and specify the view to use:
|
||||
|
||||
Reference in New Issue
Block a user