forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcomponent.html.erb
More file actions
37 lines (34 loc) · 1.14 KB
/
component.html.erb
File metadata and controls
37 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<dialog
data-controller="<%= stimulus_id %>"
<%= tag.attributes(
"aria-label": @title,
class: "relative z-10",
**@attributes
) %>
>
<a href="<%= @close_path %>" aria-hidden="true" class="cursor-default fixed inset-0 bg-full-black/50 overflow-y-auto"></a>
<div class="fixed inset-0 z-10 pointer-events-none flex min-h-full justify-center p-4 text-center items-center">
<div class="min-w-[40rem] pointer-events-auto cursor-auto relative transform overflow-auto rounded-lg bg-white text-left shadow-xl max-w-lg divide-y divide-gray-100">
<header class="flex items-center justify-between p-4">
<h3 class="text-xl font-semibold text-gray-900">
<%= @title %>
</h3>
<%= render component('ui/button').new(
tag: :a,
href: @close_path,
icon: 'close-line',
scheme: :ghost,
title: t('.close'),
) %>
</header>
<div class="p-4 overflow-auto">
<%= content %>
</div>
<% if actions? %>
<footer class="p-4 flex gap-2 justify-end">
<%= actions %>
</footer>
<% end %>
</div>
</div>
</dialog>