<?php /**
 * Label component
 * Usage: <x-form.label for="field" :required="true" label="Ten">...slot...</x-form.label>
 */ ?>
<label @if(isset($for)) for="{{ $for }}" @endif class="form-label" style="display:block;font-weight:600;color:var(--text,#0f172a);font-family:inherit;">
    @if(isset($label))
        <span class="label-text" style="display:inline;">{{ $label }}@if(!empty($required)) <span class="required" style="color:red;display:inline;margin-left:2px;">*</span>@endif</span>
    @endif
    {{ $slot }}
</label>
