moonshine-software / moonshine

Laravel Admin panel and more. Simple for beginners and powerful for experts. Using Blade, Alpine.js and Tailwind CSS.
https://moonshine-laravel.com
MIT License
714 stars 94 forks source link

Tabs content through slots #1219

Closed MadZee-M closed 1 week ago

MadZee-M commented 2 weeks ago

Компонент "tabs", добавлена возможность создавать "content" через слоты.

Применение:

Используем префикс "content-" в названии слота.

<x-moonshine::tabs :tabs="[
    'general' => 'Таб 1',
    'tokens' => 'Таб 2',
    'others' => 'Таб 3',
]">
    <x-slot name="content-general">
        Таб 1 content
    </x-slot>

    <x-slot name="content-tokens">
        Таб 2 content
    </x-slot>

    <x-slot name="content-others">
        Таб 3 content
    </x-slot>
</x-moonshine::tabs>
lee-to commented 2 weeks ago

Интересно но есть сразу проблемы в пр серьезные 1) тут логика из другого пр по copy (такого быть не должно) 2) много логики в блейде

MadZee-M commented 1 week ago

Создал без другого пр https://github.com/moonshine-software/moonshine/pull/1232