2023-07-13 11:16:24 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\View\Components\Forms;
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
|
|
|
|
class Button extends Component
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Create a new component instance.
|
|
|
|
*/
|
|
|
|
public function __construct(
|
|
|
|
public bool $disabled = false,
|
|
|
|
public bool $isModal = false,
|
2023-07-28 11:31:47 +00:00
|
|
|
public bool $noStyle = false,
|
2023-07-13 11:16:24 +00:00
|
|
|
public string|null $modalId = null,
|
2023-07-26 11:23:47 +00:00
|
|
|
public string $defaultClass = "btn btn-primary btn-sm font-normal text-white normal-case no-animation rounded border-none"
|
2023-07-13 11:16:24 +00:00
|
|
|
) {
|
2023-07-28 11:31:47 +00:00
|
|
|
if ($this->noStyle) {
|
|
|
|
$this->defaultClass = "";
|
|
|
|
}
|
2023-07-13 11:16:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the view / contents that represent the component.
|
|
|
|
*/
|
|
|
|
public function render(): View|Closure|string
|
|
|
|
{
|
|
|
|
return view('components.forms.button');
|
|
|
|
}
|
2023-07-28 11:31:47 +00:00
|
|
|
}
|