36 lines
842 B
PHP
36 lines
842 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class InputForm extends Component
|
|
{
|
|
public $value = '';
|
|
public $name;
|
|
public $label;
|
|
public $required = false;
|
|
public $withActionBtn = false;
|
|
public $isCopyUsername = false;
|
|
public $loading = false;
|
|
|
|
public function mount($name, $label, $required = false, $withActionBtn = false, $isCopyUsername = false, $loading = false)
|
|
{
|
|
$this->name = $name;
|
|
$this->label = $label;
|
|
$this->required = $required;
|
|
$this->withActionBtn = $withActionBtn;
|
|
$this->isCopyUsername = $isCopyUsername;
|
|
$this->loading = $loading;
|
|
}
|
|
|
|
public function updatedValue()
|
|
{
|
|
$this->dispatch('inputChanged', $this->value);
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.input-form');
|
|
}
|
|
} |