From d61404083040caaa3072291f93f77d2fd285bcc6 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Wed, 6 Dec 2023 21:33:43 +0000 Subject: [PATCH] Update 05-customizing-notifications.md --- .../notifications/docs/05-customizing-notifications.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/notifications/docs/05-customizing-notifications.md b/packages/notifications/docs/05-customizing-notifications.md index a97f7df6d5..b3e0bcaacf 100644 --- a/packages/notifications/docs/05-customizing-notifications.md +++ b/packages/notifications/docs/05-customizing-notifications.md @@ -12,11 +12,15 @@ Notifications have dedicated CSS classes you can hook into to apply your own sty ## 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. +You can configure the alignment of the notifications in a service provider or middleware, by calling `Notifications::alignment()` and `Notifications::verticalAlignment()`. You can pass `Alignment::Start`, `Alignment::Center`, `Alignment::End`, `VerticalAlignment::Start`, `VerticalAlignment::Center` or `VerticalAlignment::End`: ```php - Notifications::alignment(Alignment::Center); - Notifications::verticalAlignment(VerticalAlignment::Start); +use Filament\Notifications\Livewire\Notifications; +use Filament\Support\Enums\Alignment; +use Filament\Support\Enums\VerticalAlignment; + +Notifications::alignment(Alignment::Start); +Notifications::verticalAlignment(VerticalAlignment::End); ``` ## Using a custom notification view