Skip to content

Commit

Permalink
Fix modal docs (#212)
Browse files Browse the repository at this point in the history
* change link to button for modal

* change link to button for modal

* Add button type
  • Loading branch information
ashwin47 authored Mar 14, 2024
1 parent 1ba935f commit 71583cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ application.register('modal', Modal)

```html
<div data-controller="modal" data-action="keydown.esc->modal#close" tabindex="-1" class="relative z-10">
<a href="#" data-action="click->modal#open" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded">Open Modal</a>
<button type="button" data-action="click->modal#open" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Open Modal</button>

<!-- Modal Background -->
<div class="hidden fixed inset-0 bg-black bg-opacity-80 overflow-y-auto flex items-center justify-center"
Expand Down

0 comments on commit 71583cb

Please sign in to comment.