action button update
This commit is contained in:
26
kernel/widgets/IconBtn/IconBtnInstallWidget.php
Normal file
26
kernel/widgets/IconBtn/IconBtnInstallWidget.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\widgets\IconBtn;
|
||||
|
||||
use kernel\Widget;
|
||||
use kernel\widgets\ActionButtonWidget;
|
||||
|
||||
class IconBtnInstallWidget extends Widget
|
||||
{
|
||||
public static function create(array $data = []): IconBtnInstallWidget
|
||||
{
|
||||
return new static($data);
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
$url = $this->data['url'];
|
||||
|
||||
return ActionButtonWidget::create([
|
||||
'label' => "<i class='fa-solid fa-download'></i>",
|
||||
'url' => $url,
|
||||
'btn_type' => "success",
|
||||
'title' => "Установить"
|
||||
])->run();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user