mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-30 15:31:08 +02:00
30 lines
680 B
PHP
30 lines
680 B
PHP
<?php
|
|
|
|
namespace App\Filament\Server\Components;
|
|
|
|
use Closure;
|
|
use Filament\Widgets\StatsOverviewWidget\Stat;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class SmallStatBlock extends Stat
|
|
{
|
|
protected bool|Closure $copyOnClick = false;
|
|
|
|
public function copyOnClick(bool|Closure $copyOnClick = true): static
|
|
{
|
|
$this->copyOnClick = $copyOnClick;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function shouldCopyOnClick(): bool
|
|
{
|
|
return $this->evaluate($this->copyOnClick);
|
|
}
|
|
|
|
public function render(): View
|
|
{
|
|
return view('filament.components.server-small-data-block', array_merge($this->getViewData(), $this->extractPublicMethods()));
|
|
}
|
|
}
|