3 changed files with 26 additions and 47 deletions
-
28app/assets/tailwind/application.css
-
12app/views/edge/index.html.erb
-
33app/views/layouts/components/_main_dialog.html.erb
@ -1,3 +1,11 @@ |
|||
<h1 class="font-bold text-4xl">Edge#index</h1> |
|||
<%= button_link_to 'Open Dialog', class: "btn btn-primary", command: 'show-modal', commandfor: 'main-dialog' %> |
|||
<%= button_to 'Delete', @meeting, method: :delete, class: "btn btn-accent", data: { turbo_confirm: 'merci de confirmer'} %> |
|||
|
|||
<ul class="m-2 flex gap-2"> |
|||
<li> |
|||
<%= button_link_to 'Edit', class: "btn btn-primary", command: 'show-modal', commandfor: 'main-dialog' %> |
|||
</li> |
|||
|
|||
<li> |
|||
<%= button_to 'Delete', @meeting, method: :delete, class: "btn btn-error", data: { turbo_confirm: 'merci de confirmer'} %> |
|||
</li> |
|||
</ul> |
|||
@ -1,24 +1,17 @@ |
|||
<dialog |
|||
id="main-dialog" |
|||
class=" |
|||
top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 |
|||
bg-base-200 shadow-md rounded-lg |
|||
p-6 text-primary ring-2 shadow-md |
|||
backdrop:backdrop-grayscale backdrop:backdrop-blur-[0.1em] |
|||
animate-aurora |
|||
" |
|||
> |
|||
<h2 data-modal="title" class="text-2xl font-bold mb-2">Dialog Title</h2> |
|||
<dialog id="main-dialog" class="modal"> |
|||
<div class="modal-box bg-base-200"> |
|||
<h3 data-modal="title" class="text-lg font-bold">Dialog Title</h3> |
|||
|
|||
<p class="mb-6"> |
|||
This is a centered dialog using the HTML dialog element with Tailwind CSS. |
|||
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Porro quisquam |
|||
enim blanditiis iusto neque accusantium minus, aspernatur ex eius at. |
|||
Aliquam nam ex sit vel nesciunt qui ducimus velit nulla. |
|||
</p> |
|||
<p class="mb-6"> |
|||
This is a centered dialog using the HTML dialog element with Tailwind CSS. |
|||
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Porro quisquam |
|||
enim blanditiis iusto neque accusantium minus, aspernatur ex eius at. |
|||
Aliquam nam ex sit vel nesciunt qui ducimus velit nulla. |
|||
</p> |
|||
|
|||
<div class="flex gap-2 justify-end"> |
|||
<%= button_link_to 'OK', autofocus: true, value: 'confirm', class: "btn btn-accent ring-2 hover:ring-3", command: 'close', commandfor: 'main-dialog' %> |
|||
<%= button_link_to 'Cancel', value: 'cancel', class: "btn btn-primary ring-2 hover:ring-3", command: 'close', commandfor: 'main-dialog' %> |
|||
<div class="modal-action items-center text-center"> |
|||
<%= button_link_to 'OK', value: 'confirm', class: "btn btn-primary", command: 'close', commandfor: 'main-dialog' %> |
|||
<%= button_link_to 'Cancel', value: 'cancel', class: "btn btn-ghost", command: 'close', commandfor: 'main-dialog' %> |
|||
</div> |
|||
</div> |
|||
</dialog> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue