Skip to content

Commit f17d707

Browse files
Update SimpleAlert class namespaces and usage
1 parent d9e2ede commit f17d707

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ Make sure you add the following to your `theme.css` file.
3636
The alerts can be used in your `infolists` or `forms`, make sure you pick the right component.
3737

3838
```php
39-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
39+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
4040
```
4141

4242
```php
43-
use CodeWithDennis\SimpleAlert\Components\Forms\SimpleAlert;
43+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
4444
```
4545

4646
### Simple Alerts
4747

4848
There are 4 types of simple alerts: `danger`, `info`, `success`, and `warning`.
4949

5050
```php
51-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
51+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
5252

5353
SimpleAlert::make('example')
5454
->danger()
@@ -60,7 +60,7 @@ SimpleAlert::make('example')
6060
If you would like to use a [different color](https://filamentphp.com/docs/3.x/support/colors), you can use the `color` method.
6161

6262
```php
63-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
63+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
6464

6565
SimpleAlert::make('example')
6666
->color('purple')
@@ -71,7 +71,7 @@ SimpleAlert::make('example')
7171
By default, simple alerts come with an icon. For example, the `->danger()` method includes a `heroicon-s-x-circle` icon. If you want to use a different icon, you can use the icon method.
7272

7373
```php
74-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
74+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
7575
//use Illuminate\Support\HtmlString;
7676

7777
SimpleAlert::make('example')
@@ -86,7 +86,7 @@ SimpleAlert::make('example')
8686
You can add animation to the icon by passing the animation type as the second parameter to the `icon` method. Make sure to use the `IconAnimation` enum for the animation type.
8787

8888
```php
89-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
89+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
9090
use CodeWithDennis\SimpleAlert\Components\Enums\IconAnimation;
9191

9292
SimpleAlert::make('example')
@@ -98,7 +98,7 @@ SimpleAlert::make('example')
9898
You can change the vertical alignment of the icon by using the `iconVerticalAlignment` method.
9999

100100
```php
101-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
101+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
102102

103103
SimpleAlert::make('example')
104104
->iconVerticalAlignment('start'), // possible values: start, center
@@ -109,7 +109,7 @@ SimpleAlert::make('example')
109109
You can add a title to the alert by using the `title` method.
110110

111111
```php
112-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
112+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
113113

114114
SimpleAlert::make('example')
115115
->title('Hoorraayy! Your request has been approved! 🎉')
@@ -120,7 +120,7 @@ SimpleAlert::make('example')
120120
You can add a description to the alert by using the `description` method.
121121

122122
```php
123-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
123+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
124124

125125
SimpleAlert::make('example')
126126
->description('This is the description')
@@ -131,7 +131,7 @@ SimpleAlert::make('example')
131131
You can add a border to the alert by using the `border` method.
132132

133133
```php
134-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
134+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
135135

136136
SimpleAlert::make('example')
137137
->border()
@@ -141,7 +141,7 @@ SimpleAlert::make('example')
141141
You can also add actions to the alert by using the `actions` method. All regular action features are supported.
142142

143143
```php
144-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
144+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
145145
use Filament\Forms\Components\Actions;
146146

147147
SimpleAlert::make('example')
@@ -163,7 +163,7 @@ SimpleAlert::make('example')
163163
You can change the vertical alignment of the actions by using the `actionsVerticalAlignment` method.
164164

165165
```php
166-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
166+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
167167
use Filament\Forms\Components\Actions;
168168

169169
SimpleAlert::make('example')
@@ -174,7 +174,7 @@ SimpleAlert::make('example')
174174
### Example
175175

176176
```php
177-
use CodeWithDennis\SimpleAlert\Components\Infolists\SimpleAlert;
177+
use CodeWithDennis\SimpleAlert\Components\SimpleAlert;
178178
use Filament\Forms\Components\Actions;
179179

180180
SimpleAlert::make('example')

0 commit comments

Comments
 (0)