Skip to content

Commit

Permalink
Update modal docs
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Mar 15, 2024
1 parent 1e1c4f6 commit 3f5c02d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ application.register('modal', Modal)
```

```html
<div data-controller="dialog">
<dialog data-dialog-target="dialog" class="p-8 rounded-lg backdrop:bg-black/80">
<div data-controller="modal">
<dialog data-modal-target="modal" class="p-8 rounded-lg backdrop:bg-black/80">
<p>This modal dialog has a groovy backdrop!</p>
<button autofocus data-action="dialog#close" class="px-2.5 py-1 bg-blue-500 text-white text-sm rounded">Close</button>
<button autofocus data-action="modal#close" class="px-2.5 py-1 bg-blue-500 text-white text-sm rounded">Close</button>
</dialog>
<button data-action="dialog#showModal" class="bg-blue-500 hover:bg-blue-700 text-white text-sm font-bold py-1 px-2.5 rounded">Open modal</button>
<button data-action="modal#showModal" class="bg-blue-500 hover:bg-blue-700 text-white text-sm font-bold py-1 px-2.5 rounded">Open modal</button>
</div>
```

Expand Down

0 comments on commit 3f5c02d

Please sign in to comment.