button fix, kernel update

This commit is contained in:
2024-12-19 12:53:55 +03:00
parent 4ff9fa9ad3
commit e75d21bd1b
15 changed files with 393 additions and 47 deletions

View File

@ -6,9 +6,9 @@ class PrimaryBtn
{
protected string $btn = '';
public function __construct(string $title, string $url)
public function __construct(string $title, string $url, $width)
{
$this->btn = "<a class='btn btn-primary' href='$url' style='margin: 3px; width: 150px;' >$title</a>";
$this->btn = "<a class='btn btn-primary' href='$url' style='margin: 3px; width: '$width >$title</a>";
}
public function fetch(): string
@ -16,9 +16,9 @@ class PrimaryBtn
return $this->btn;
}
public static function create(string $title, string $url): PrimaryBtn
public static function create(string $title, string $url, $width = '150px'): PrimaryBtn
{
return new self($title, $url);
return new self($title, $url, $width);
}
}