diff --git a/docs-assets/app/app/Http/Livewire/Actions.php b/docs-assets/app/app/Http/Livewire/Actions.php new file mode 100644 index 0000000000..7a2087bfc7 --- /dev/null +++ b/docs-assets/app/app/Http/Livewire/Actions.php @@ -0,0 +1,68 @@ +label('Edit') + ->button(); + } + + public function linkAction(): Action + { + return Action::make('linkAction') + ->label('Edit') + ->link(); + } + + public function iconButtonAction(): Action + { + return Action::make('iconButtonAction') + ->icon('heroicon-o-pencil-square') + ->iconButton(); + } + + public function dangerAction(): Action + { + return Action::make('dangerAction') + ->label('Delete') + ->color('danger'); + } + + public function largeAction(): Action + { + return Action::make('largeAction') + ->label('Create') + ->size('lg'); + } + + public function iconAction(): Action + { + return Action::make('iconAction') + ->label('Edit') + ->icon('heroicon-m-pencil-square'); + } + + public function iconAfterAction(): Action + { + return Action::make('iconAfterAction') + ->label('Edit') + ->icon('heroicon-m-pencil-square') + ->iconPosition('after'); + } + + public function render() + { + return view('livewire.actions'); + } +} diff --git a/docs-assets/app/resources/views/livewire/actions.blade.php b/docs-assets/app/resources/views/livewire/actions.blade.php new file mode 100644 index 0000000000..3bc26f4558 --- /dev/null +++ b/docs-assets/app/resources/views/livewire/actions.blade.php @@ -0,0 +1,29 @@ +
+
+ {{ $this->buttonAction }} +
+ +
+ {{ $this->linkAction }} +
+ +
+ {{ $this->iconButtonAction }} +
+ +
+ {{ $this->dangerAction }} +
+ +
+ {{ $this->largeAction }} +
+ +
+ {{ $this->iconAction }} +
+ +
+ {{ $this->iconAfterAction }} +
+
diff --git a/docs-assets/app/resources/views/welcome.blade.php b/docs-assets/app/resources/views/welcome.blade.php deleted file mode 100644 index 0406510b99..0000000000 --- a/docs-assets/app/resources/views/welcome.blade.php +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Laravel - - - - - - - - - -
- @if (Route::has('login')) -
- @auth - Home - @else - Log in - - @if (Route::has('register')) - Register - @endif - @endauth -
- @endif - -
-
- - - -
- - - -
- - -
- Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }}) -
-
-
-
- - diff --git a/docs-assets/app/routes/web.php b/docs-assets/app/routes/web.php index d259f33ea8..afdd09238c 100644 --- a/docs-assets/app/routes/web.php +++ b/docs-assets/app/routes/web.php @@ -1,5 +1,6 @@ action(fn () => $this->post->delete()) ->color('danger') ``` @@ -65,8 +64,7 @@ Action::make('delete') Buttons come in 3 sizes - `sm`, `md` or `lg`. You can change the size of the action's trigger using the `size()` method: ```php -Action::make('delete') - ->action(fn () => $this->post->delete()) +Action::make('create') ->size('lg') ``` @@ -115,4 +113,4 @@ use Filament\Actions\Action; Action::make('save') ->action(fn () => $this->save()) ->keyBindings(['command+s', 'ctrl+s']) -``` \ No newline at end of file +```