coolify/app/View/Components/Forms/Button.php

30 lines
640 B
PHP
Raw Normal View History

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