mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
Merge (#127)
This commit is contained in:
20
resources/views/components/live.blade.php
Normal file
20
resources/views/components/live.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
@props([
|
||||
"interval" => "30s",
|
||||
"id",
|
||||
"target" => null,
|
||||
])
|
||||
|
||||
<div
|
||||
id="{{ $id }}"
|
||||
hx-get="{{ request()->getUri() }}"
|
||||
hx-trigger="every {{ $interval }}"
|
||||
@if ($target)
|
||||
hx-target="{{ $target }}"
|
||||
hx-select="{{ $target }}"
|
||||
@else
|
||||
hx-select="#{{ $id }}"
|
||||
@endif
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
Reference in New Issue
Block a user