From cd61f5f1d0c96c638724211de155344d5525176c Mon Sep 17 00:00:00 2001 From: joshtorres Date: Sat, 30 Sep 2023 20:45:53 +0000 Subject: [PATCH] Fix styling --- src/Livewire/WithInlineInput.php | 3 ++- src/Livewire/WithMap.php | 6 ++++-- src/Livewire/WithNotification.php | 9 ++++++--- src/Livewire/WithStripe.php | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Livewire/WithInlineInput.php b/src/Livewire/WithInlineInput.php index 6d9b681..060df4d 100644 --- a/src/Livewire/WithInlineInput.php +++ b/src/Livewire/WithInlineInput.php @@ -22,7 +22,8 @@ public function setEditMode() { $this->editMode = true; - $this->dispatch('edit-mode', + $this->dispatch( + 'edit-mode', id: $this->model()->getKey(), ); } diff --git a/src/Livewire/WithMap.php b/src/Livewire/WithMap.php index d760305..ae2f26c 100644 --- a/src/Livewire/WithMap.php +++ b/src/Livewire/WithMap.php @@ -6,7 +6,8 @@ trait WithMap { public function addPlaces(string $mapId, array $places) { - $this->dispatch($mapId, + $this->dispatch( + $mapId, type:'loadPlaces', places:$this->formatPlaces($places), ); @@ -14,7 +15,8 @@ public function addPlaces(string $mapId, array $places) public function flyTo(string $mapId, string $lng, string $lat) { - $this->dispatch($mapId, + $this->dispatch( + $mapId, type:'fly', coordinate:[$lng, $lat], ); diff --git a/src/Livewire/WithNotification.php b/src/Livewire/WithNotification.php index 98e6430..1758591 100644 --- a/src/Livewire/WithNotification.php +++ b/src/Livewire/WithNotification.php @@ -6,7 +6,8 @@ trait WithNotification { public function success(string $message, ?array $action = null) { - $this->dispatch('notify', + $this->dispatch( + 'notify', message: $message, type:'success', action:$action, @@ -15,7 +16,8 @@ public function success(string $message, ?array $action = null) public function error(string $message, ?array $action = null) { - $this->dispatch('notify', + $this->dispatch( + 'notify', message: $message, type:'error', action:$action, @@ -24,7 +26,8 @@ public function error(string $message, ?array $action = null) public function info(string $message, ?array $action = null) { - $this->dispatch('notify', + $this->dispatch( + 'notify', message: $message, type:'info', action:$action, diff --git a/src/Livewire/WithStripe.php b/src/Livewire/WithStripe.php index 6a8bfda..db22aa1 100644 --- a/src/Livewire/WithStripe.php +++ b/src/Livewire/WithStripe.php @@ -36,7 +36,8 @@ public function updateStripePaymentMethod(string $event, string $message) $this->dispatch('stripe-payment-method-updated'); // Notify payment method was updated. - $this->dispatch(empty($event) ? 'notify' : $event, + $this->dispatch( + empty($event) ? 'notify' : $event, type: 'success', message: empty($message) ? 'Your payment method was updated!' : $message, );