<?phpnamespace App\Gui;use JumPHP\Gui\Theme;use JumPHP\Gui\Widget;use JumPHP\Renderer\Renderer;/** * One of the Icons, as a widget of a form (the question mark of a confirmation, the logo of About...). * * @property string $kind */final class IconBox extends Widget{ public const DEFAULTS = ['kind' => 'info', 'width' => 32, 'height' => 32]; protected function content(Theme $t, float $maxWidth, string $breakpoint): array { return [$t->px(32), $t->px(32)]; } public function stretches(string $axis): bool { return false; } public function render(Renderer $r, Theme $t): void { Icons::draw($r, (string)$this->props['kind'], $this->x, $this->y, min($this->w, $this->h)); }}