انتقل إلى المحتوى
الأدلة
التنقل
التنبيهات
الطبقات العائمة
التخطيط
عرض البيانات
النماذج
.md

الطبقات العائمة

alert-dialog

نافذة تقاطع المستخدم وتنتظر ردًا مقصودًا.

حذف هذا المشروع؟

سيُحذف المشروع وكل ما فيه. لا يمكن التراجع عن ذلك.

التثبيت

php artisan ui:add alert-dialog

الاستخدام

<x-ui.alert-dialog title="Delete this project?"
    description="This cannot be undone.">
    <x-slot:trigger>
        <x-ui.button variant="destructive">Delete project</x-ui.button>
    </x-slot:trigger>

    {{-- Anything marked data-ui-alert-dialog-close dismisses it; the overlay
         deliberately does not. --}}
    <x-slot:footer>
        <x-ui.button variant="outline" data-ui-alert-dialog-close>Cancel</x-ui.button>
        <x-ui.button variant="destructive" data-ui-alert-dialog-close>Delete</x-ui.button>
    </x-slot:footer>
</x-ui.alert-dialog>

عنصر dialog أصلي مع <script> مضمّن خاص به؛ بلا اعتماديات JS. بخلاف dialog لا يوجد زر إغلاق والخلفية لا تستجيب. ضع أزرار الإغلاق في خانة footer وعلّمها بـ data-ui-alert-dialog-close.

الخصائص

كل خاصية مع قيمتها الافتراضية. مرّر أيًّا منها كسمة، واستخدم : لربط قيمة PHP.

@props([
    'title' => null,
    'description' => null,
])