diff --git a/src/Traits/Toast.php b/src/Traits/Toast.php index b377a038..e7178ace 100644 --- a/src/Traits/Toast.php +++ b/src/Traits/Toast.php @@ -9,12 +9,12 @@ trait Toast public function toast( string $type, string $title, - string $description = null, - string $position = null, + ?string $description = null, + ?string $position = null, string $icon = 'o-information-circle', string $css = 'alert-info', int $timeout = 3000, - string $redirectTo = null + ?string $redirectTo = null ) { $toast = [ 'type' => $type, @@ -38,48 +38,48 @@ public function toast( public function success( string $title, - string $description = null, - string $position = null, + ?string $description = null, + ?string $position = null, string $icon = 'o-check-circle', string $css = 'alert-success', int $timeout = 3000, - string $redirectTo = null + ?string $redirectTo = null ) { return $this->toast('success', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function warning( string $title, - string $description = null, - string $position = null, + ?string $description = null, + ?string $position = null, string $icon = 'o-exclamation-triangle', string $css = 'alert-warning', int $timeout = 3000, - string $redirectTo = null + ?string $redirectTo = null ) { return $this->toast('warning', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function error( string $title, - string $description = null, - string $position = null, + ?string $description = null, + ?string $position = null, string $icon = 'o-x-circle', string $css = 'alert-error', int $timeout = 3000, - string $redirectTo = null + ?string $redirectTo = null ) { return $this->toast('error', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function info( string $title, - string $description = null, - string $position = null, + ?string $description = null, + ?string $position = null, string $icon = 'o-information-circle', string $css = 'alert-info', int $timeout = 3000, - string $redirectTo = null + ?string $redirectTo = null ) { return $this->toast('info', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } diff --git a/src/View/Components/Menu.php b/src/View/Components/Menu.php index b95e3ddb..f21d2bec 100644 --- a/src/View/Components/Menu.php +++ b/src/View/Components/Menu.php @@ -13,6 +13,7 @@ class Menu extends Component public function __construct( public ?string $title = null, public ?string $icon = null, + public ?string $iconClass = null, public ?bool $separator = false, public ?bool $activateByRoute = false, public ?string $activeBgColor = 'bg-base-300', @@ -29,7 +30,7 @@ public function render(): View|Closure|string