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(
|
2023-08-08 09:51:36 +00:00
|
|
|
public bool $disabled = false,
|
|
|
|
public bool $noStyle = false,
|
2023-08-30 12:46:51 +00:00
|
|
|
public ?string $modalId = null,
|
2024-03-19 14:37:16 +00:00
|
|
|
public string $defaultClass = "button"
|
2023-08-11 18:48:52 +00:00
|
|
|
) {
|
2023-07-28 11:31:47 +00:00
|
|
|
if ($this->noStyle) {
|
|
|
|
$this->defaultClass = "";
|
|
|
|
}
|
2023-07-13 11:16:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function render(): View|Closure|string
|
|
|
|
{
|
|
|
|
return view('components.forms.button');
|
|
|
|
}
|
2023-08-08 09:51:36 +00:00
|
|
|
}
|