gps_system/resources/views/flux/with-inline-field.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

33 lines
691 B
PHP

@php
extract(flux::forwardedattributes($attributes, [
'name',
'description',
'label',
]));
@endphp
@props([
'name' => $attributes->whereStartsWith('wire:model')->first(),
'description' => null,
'label' => null,
])
<?php if (isset($label) || isset($description)): ?>
<flux:field variant="inline">
{{ $slot }}
<?php if (isset($label)): ?>
<flux:label>{{ $label }}</flux:label>
<?php endif; ?>
<?php if (isset($description)): ?>
<flux:description>{{ $description }}</flux:description>
<?php endif; ?>
<flux:error :$name />
</flux:field>
<?php else: ?>
{{ $slot }}
<?php endif; ?>