<x-form> renders data-md-form and data-md-form-actions, and its column and actions row move to components/form.css in material.components, on the spacing tokens (plan step 36). The actions slot's own attributes still land on the row. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
25 lines
769 B
PHP
25 lines
769 B
PHP
{{-- A form: its fields in one column, and its actions at the foot.
|
|
|
|
16px between fields, because a text field floats its label half above its outline: any less
|
|
and the hint under one field runs into the label of the next. The `actions` slot takes
|
|
attributes of its own (a `class` from the call site lands on the row untouched); `separator`
|
|
draws a divider above it. The column is resources/css/components/form.css. --}}
|
|
|
|
@props([
|
|
'separator' => false,
|
|
])
|
|
|
|
<form data-md-form {{ $attributes }}>
|
|
{{ $slot }}
|
|
|
|
@isset($actions)
|
|
@if ($separator)
|
|
<x-livewire-material::divider />
|
|
@endif
|
|
|
|
<div data-md-form-actions {{ $actions->attributes }}>
|
|
{{ $actions }}
|
|
</div>
|
|
@endisset
|
|
</form>
|