Add some examples

This commit is contained in:
samy
2025-06-17 15:23:58 -10:00
parent 1a3f679222
commit 3580895e05
4 changed files with 293 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
{{--A normal URL modal--}}
<a
x-data
x-confirm-modal
data-url="/some-url"
data-title="Do that?"
data-message="Doing that needs some confirmation."
data-confirm-label="Yes, do that"
data-cancel-label="No thanks"
class="btn btn-primary">
Button text
</a>
{{--A modal building a form and reaching the action with a method--}}
<a
x-data
x-confirm-modal
data-action="/some-action"
data-method="METHOD"
data-title="Do that?"
data-message="Doing that needs some confirmation."
data-confirm-label="Yes, do that"
data-cancel-label="No thanks"
class="btn btn-error">
Button text
</a>