I'm working with Flux, but I don't think this is specific to that library.
They provide a component for items in a navlist, and the properties are listed at the top
@props([
'iconVariant' => 'outline',
'iconTrailing' => null,
'badgeColor' => null,
'variant' => null,
'iconDot' => null,
'accent' => true,
'badge' => null,
'icon' => null,
])
Because I need to override the styles, I created by own component that uses theirs
<flux:navlist.item {{ $attributes->merge([
'href' => $href ?? route($route),
'class' => '...',
'iconTrailing' => $attributes['icon-trailing'],
]) }}
>
{{ $slot }}
</flux:navlist.item>
As you can see I have to manually pass down iconTrailing or it won't work. Similarly I cannot use any other properties.
For example, if I want to add a badge, from Flux's documentation I can do this
<flux:navbar.item href="#" badge="Pro" badge-color="lime">Calendar</flux:navbar.item>
But unless I specifically pass down badge and badgeColor in my components, this won't work
<x-navlist.item href="#" badge="Pro" badge-color="lime">Calendar</x-navlist.item>
So, is there a way for me to not having to specifically pass down each property?