Files
2026-09-21 10:14:57 +01:00

20 lines
813 B
PHP
Executable File

@php
use Filament\Support\Enums\Alignment;
$alignment = $getAlignment();
$height = $getImageHeight() ?? '8rem';
$width = $getImageWidth();
$tooltip = $getTooltip();
if (!$alignment instanceof Alignment) {
$alignment = filled($alignment) ? Alignment::tryFrom($alignment) ?? $alignment : null;
}
@endphp
<img alt="{{ $getAlt() }}" src="{{ $getUrl() }}"
@if (filled($tooltip)) x-tooltip="{ content: @js($tooltip), theme: $store.theme, allowHTML: @js($tooltip instanceof \Illuminate\Contracts\Support\Htmlable) }" @endif
{{ $getExtraAttributeBag()->class(['fi-sc-image', $alignment instanceof Alignment ? "fi-align-{$alignment->value}" : $alignment])->style([
'height: ' . e($height) => $height,
'width: ' . e($width) => $width,
]) }} />