57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use Closure;
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\View\Component;
|
|
|
|
class ButtonCRM extends Component
|
|
{
|
|
/**
|
|
* Create a new component instance.
|
|
*/
|
|
public $type;
|
|
public $route;
|
|
public $url;
|
|
public $icon;
|
|
public $variant;
|
|
public $size;
|
|
public $params;
|
|
public $confirm;
|
|
public $confirmUrl;
|
|
public $confirmName;
|
|
|
|
public function __construct(
|
|
$type = 'button',
|
|
$route = null,
|
|
$params = [],
|
|
$url = null,
|
|
$icon = null,
|
|
$variant = 'primary',
|
|
$size = 'md',
|
|
$confirm = false,
|
|
$confirmUrl = null,
|
|
$confirmName = null
|
|
) {
|
|
$this->type = $type;
|
|
$this->route = $route;
|
|
$this->params = $params;
|
|
$this->url = $url;
|
|
$this->icon = $icon;
|
|
$this->variant = $variant;
|
|
$this->size = $size;
|
|
$this->confirm = $confirm;
|
|
$this->confirmUrl = $confirmUrl;
|
|
$this->confirmName = $confirmName;
|
|
}
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*/
|
|
public function render(): View|Closure|string
|
|
{
|
|
return view('components.button-c-r-m');
|
|
}
|
|
}
|