action button class

This commit is contained in:
2024-11-19 13:41:13 +03:00
parent 772ad48961
commit 0f47f73dda
10 changed files with 67 additions and 29 deletions

View File

@ -0,0 +1,15 @@
<?php
namespace kernel\IGTabel\btn;
class ActionButton
{
public static function create(array $data): string
{
$btn_type = $data['btn_type'];
$url = $data['url'];
$label = $data['label'];
return "<a class='btn btn-$btn_type' href='$url' style='margin: 3px'>$label</a>";
}
}