diff --git a/src/FlashMessageServiceProvider.php b/src/FlashMessageServiceProvider.php index 27c8261..77605b0 100644 --- a/src/FlashMessageServiceProvider.php +++ b/src/FlashMessageServiceProvider.php @@ -3,7 +3,12 @@ namespace Bilfeldt\LaravelFlashMessage; use Bilfeldt\LaravelFlashMessage\View\Components\Alert; +use Bilfeldt\LaravelFlashMessage\View\Components\AlertError; +use Bilfeldt\LaravelFlashMessage\View\Components\AlertInfo; +use Bilfeldt\LaravelFlashMessage\View\Components\AlertMessage; use Bilfeldt\LaravelFlashMessage\View\Components\AlertMessages; +use Bilfeldt\LaravelFlashMessage\View\Components\AlertSuccess; +use Bilfeldt\LaravelFlashMessage\View\Components\AlertWarning; use Illuminate\Http\RedirectResponse; use Illuminate\View\Factory; use Illuminate\View\View; @@ -27,8 +32,13 @@ public function configurePackage(Package $package): void ->hasViews() // required for the view component blade files to be registered ->hasViewComponents( self::VIEW_COMPONENT_NAMESPACE, + AlertMessages::class, Alert::class, - AlertMessages::class + AlertError::class, + AlertInfo::class, + AlertMessage::class, + AlertSuccess::class, + AlertWarning::class ); } diff --git a/src/View/Components/AbstractAlert.php b/src/View/Components/AbstractAlert.php new file mode 100644 index 0000000..d12b71c --- /dev/null +++ b/src/View/Components/AbstractAlert.php @@ -0,0 +1,21 @@ +text = $text; + $this->title = $title; + $this->messages = $messages; + $this->links = $links; + } +} diff --git a/src/View/Components/AlertError.php b/src/View/Components/AlertError.php new file mode 100644 index 0000000..261a6bd --- /dev/null +++ b/src/View/Components/AlertError.php @@ -0,0 +1,11 @@ +