gps_system/resources/views/flux/aside.blade.php
sackey 6b878bb0a0
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
Initial commit
2025-09-12 16:19:56 +00:00

22 lines
469 B
PHP

@pure
@props([
'sticky' => null,
])
@php
$classes = Flux::classes('[grid-area:aside]');
if ($sticky) {
$attributes = $attributes->merge([
'x-data' => '',
'x-bind:style' => '{ position: \'sticky\', top: $el.offsetTop + \'px\', \'max-height\': \'calc(100dvh - \' + $el.offsetTop + \'px)\' }',
'class' => 'max-h-[100vh] overflow-y-auto',
]);
}
@endphp
<div {{ $attributes->class($classes) }} data-flux-aside>
{{ $slot }}
</div>