first commit
This commit is contained in:
29
app/View/Components/ActivityIcon.php
Normal file
29
app/View/Components/ActivityIcon.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class ActivityIcon extends Component
|
||||
{
|
||||
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.activity-icon');
|
||||
}
|
||||
}
|
||||
31
app/View/Components/FolderItem.php
Normal file
31
app/View/Components/FolderItem.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class FolderItem extends Component
|
||||
{
|
||||
|
||||
public $folder;
|
||||
public $level;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct($folder, $level = 0)
|
||||
{
|
||||
$this->folder = $folder;
|
||||
$this->level = $level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.folder-item');
|
||||
}
|
||||
}
|
||||
35
app/View/Components/Multiselect.php
Normal file
35
app/View/Components/Multiselect.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class Multiselect extends Component
|
||||
{
|
||||
|
||||
public $options;
|
||||
public $selected;
|
||||
public $name;
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct($options = [], $selected = [], $name = 'multiselect', $id = null)
|
||||
{
|
||||
$this->options = $options;
|
||||
$this->selected = $selected;
|
||||
$this->name = $name;
|
||||
$this->id = $id ?? 'multiselect-' . uniqid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.multiselect');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user