Name what a component tag takes in place of each Blade directive
The guard said a directive does not compile inside a component tag but
not what to write instead, and the skill's note said only "use {{ }}".
SealShare's two-factor challenge had @js in an x-data on <x-stack>, and
its implementer had to work out {{ Js::from() }} from Laravel's source.
Each message now names the form: Js::from for @js, json_encode for
@json, Arr::toCssClasses and toCssStyles for @class and @style,
$wire.entangle for @entangle, a bound attribute for @disabled and its
kin, and a prop, an echo or a plain element for control structures
(plan step 46).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d0bed0da69
commit
a5ad6af698
@@ -0,0 +1,7 @@
|
||||
<x-button x-data="{ open: @js($open) }" />
|
||||
<x-button x-data="{ items: @json($items) }" />
|
||||
<x-icon name="home" @class(['is-open' => $open]) />
|
||||
<x-icon name="home" @style(['inline-size: 2rem' => $open]) />
|
||||
<x-input x-data="{ value: @entangle('value') }" />
|
||||
<x-button @disabled($locked) />
|
||||
<x-card @if ($open) outlined @endif />
|
||||
Reference in New Issue
Block a user