| 1 |
<?php |
| 2 |
|
| 3 |
namespace SimpleAnalytics\Settings\Blocks; |
| 4 |
|
| 5 |
use SimpleAnalytics\Settings\Block; |
| 6 |
use function SimpleAnalytics\get_icon; |
| 7 |
|
| 8 |
class CalloutBlock implements Block |
| 9 |
{ |
| 10 |
/** |
| 11 |
* @readonly |
| 12 |
* @var string |
| 13 |
*/ |
| 14 |
private $text; |
| 15 |
public function __construct(string $text) |
| 16 |
{ |
| 17 |
$this->text = $text; |
| 18 |
} |
| 19 |
public function render(): void |
| 20 |
{ |
| 21 |
?> |
| 22 |
<div class="rounded-md bg-blue-50 p-4"> |
| 23 |
<div class="flex"> |
| 24 |
<div class="flex-shrink-0"> |
| 25 |
<?php |
| 26 |
echo get_icon('info')->class('h-5 w-5 text-blue-400'); |
| 27 |
?> |
| 28 |
</div> |
| 29 |
<div class="ml-2.5 flex-1 md:flex md:justify-between"> |
| 30 |
<p class="text-sm text-blue-700"><?php |
| 31 |
echo htmlspecialchars($this->text); |
| 32 |
?></p> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
} |
| 38 |
} |
| 39 |
|