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 Checkbox extends Component
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Create a new component instance.
|
|
|
|
*/
|
|
|
|
public function __construct(
|
|
|
|
public string|null $id = null,
|
|
|
|
public string|null $name = null,
|
|
|
|
public string|null $value = null,
|
|
|
|
public string|null $label = null,
|
|
|
|
public string|null $helper = null,
|
2023-08-31 11:10:39 +00:00
|
|
|
public string|bool $instantSave = false,
|
2023-08-08 09:51:36 +00:00
|
|
|
public bool $disabled = false,
|
2024-01-21 13:30:03 +00:00
|
|
|
public string $defaultClass = "toggle toggle-xs toggle-warning rounded disabled:bg-coolgray-200 disabled:opacity-50 placeholder:text-neutral-700",
|
2023-08-11 18:48:52 +00:00
|
|
|
) {
|
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.checkbox');
|
|
|
|
}
|
|
|
|
}
|