diff --git a/README.md b/README.md index 98169b8..b36e256 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You can add a title to the alert by using the `title` method: ```php SimpleAlertEntry::make() - ->title('This is the title') + ->title('Hoorraayy! Your request has been approved! 🎉') ``` ### Description @@ -95,12 +95,20 @@ SimpleAlertEntry::make() SimpleAlertEntry::make() ->success() ->title(new HtmlString('Hoorraayy! Your request has been approved! 🎉')) - ->description('Lorem ipsum dolor sit amet consectetur adipisicing elit.') + ->description('Lorem ipsum dolor sit amet consectetur adipisicing elit.') ->link('https://filamentphp.com') ->linkLabel('Read more!') ->linkBlank(), ``` +### Screenshots + +![success](resources/screenshots/success.png) +![danger](resources/screenshots/danger.png) +![info](resources/screenshots/info.png) +![warning](resources/screenshots/warning.png) +![info](resources/screenshots/info-with-link.png) + ## Contributing Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. diff --git a/img.png b/img.png new file mode 100644 index 0000000..52edb8c Binary files /dev/null and b/img.png differ diff --git a/resources/screenshots/danger.png b/resources/screenshots/danger.png new file mode 100644 index 0000000..6139fd7 Binary files /dev/null and b/resources/screenshots/danger.png differ diff --git a/resources/screenshots/info-with-link.png b/resources/screenshots/info-with-link.png new file mode 100644 index 0000000..dba1456 Binary files /dev/null and b/resources/screenshots/info-with-link.png differ diff --git a/resources/screenshots/info.png b/resources/screenshots/info.png new file mode 100644 index 0000000..d2a3f14 Binary files /dev/null and b/resources/screenshots/info.png differ diff --git a/resources/screenshots/success.png b/resources/screenshots/success.png new file mode 100644 index 0000000..4d38a27 Binary files /dev/null and b/resources/screenshots/success.png differ diff --git a/resources/screenshots/warning.png b/resources/screenshots/warning.png new file mode 100644 index 0000000..d02b366 Binary files /dev/null and b/resources/screenshots/warning.png differ diff --git a/src/Components/SimpleAlertEntry.php b/src/Components/SimpleAlert.php similarity index 97% rename from src/Components/SimpleAlertEntry.php rename to src/Components/SimpleAlert.php index 87db2d1..d87a404 100644 --- a/src/Components/SimpleAlertEntry.php +++ b/src/Components/SimpleAlert.php @@ -5,7 +5,7 @@ use Closure; use Filament\Infolists\Components\Entry; -class SimpleAlertEntry extends Entry +class SimpleAlert extends Entry { protected string $view = 'filament-simple-alert::simple-alert-entry'; @@ -48,6 +48,7 @@ public function info(): static public function success(): static { + $this->type = 'success'; $this->icon = 'heroicon-s-check-circle'; return $this;