PHP code example of batnieluyo / livewire-slide-over
1. Go to this page and download the library: Download batnieluyo/livewire-slide-over library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
batnieluyo / livewire-slide-over example snippets
namespace App\Livewire;
use WireComponents\LivewireSlideOvers\SlideOverComponent;
class ShoppingCart extends SlideOverComponent
{
public function render()
{
return view('livewire.shopping-cart');
}
}
return [
/*
|--------------------------------------------------------------------------
| Include CSS
|--------------------------------------------------------------------------
|
| The modal uses TailwindCSS, if you don't use TailwindCSS you will need
| to set this parameter to true. This includes the modern-normalize css.
|
*/
'include_css' => true,
/*
|--------------------------------------------------------------------------
| Include JS
|--------------------------------------------------------------------------
|
| Livewire UI will inject the => \WireComponents\LivewireSlideOvers\Position::Right,
/*
|--------------------------------------------------------------------------
| Slide Over Component Defaults
|--------------------------------------------------------------------------
|
| Configure the default properties for a slide-over component.
|
| Supported slide_over_max_width
| 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl'
*/
'component_defaults' => [
'slide_over_max_width' => 'xl',
'close_slide_over_on_click_away' => true,
'close_slide_over_on_escape' => true,
'close_slide_over_on_escape_is_forceful' => true,
'dispatch_close_event' => false,
'destroy_on_close' => false,
],
];