Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<div class="contents" data-controller="ui--dialog"> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:border-input! h-9 px-4 py-2 disabled:cursor-not-allowed" aria-haspopup="dialog" aria-expanded="false" aria-controls="ui-dialog-62b3260a" data-ui--dialog-target="trigger" data-action="click->ui--dialog#open">Open dialog</button>
<dialog id="ui-dialog-62b3260a" class="fixed inset-0 m-0 p-0 max-w-none max-h-none w-full h-full bg-transparent border-0 overflow-visible open:flex open:items-center open:justify-center backdrop:bg-black/60 backdrop:backdrop-blur-[1px]" data-ui--dialog-target="content" data-state="closed">
<div class="relative flex flex-col w-full max-h-[calc(100vh-2rem)] overflow-hidden rounded-lg border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 max-w-lg" data-state="closed" data-ui--dialog-part="panel">
<button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:text-muted-foreground! hover:bg-accent hover:text-accent-foreground disabled:bg-transparent! h-7 w-7 disabled:cursor-not-allowed absolute right-4 top-4 p-0" aria-label="Close" data-action="click->ui--dialog#close" data-ui-dialog-close="true">
<i data-lucide="x" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i>
</button>
<div class="overflow-y-auto flex-1 min-h-0 ">
<div class="space-y-3 text-sm text-muted-foreground">
<p>This dialog has no title or description header.</p>
<p>Use this pattern when the content speaks for itself or when you want a cleaner, minimal modal.</p>
</div>
<div class="mt-4 flex justify-end gap-2">
<button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:border-input! h-9 px-4 py-2 disabled:cursor-not-allowed static" aria-label="Close" data-action="click->ui--dialog#close" data-ui-dialog-close="true">
Close
</button>
<button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 disabled:cursor-not-allowed" aria-busy="false">Okay</button>
</div>
</div>
</div>
</dialog></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
<%= render(UI::Dialog.new) do |dialog| %>
<% dialog.with_trigger(variant: :outline) { "Open dialog" } %>
<% dialog.with_content do %>
<div class="space-y-3 text-sm text-muted-foreground">
<p>This dialog has no title or description header.</p>
<p>Use this pattern when the content speaks for itself or when you want a cleaner, minimal modal.</p>
</div>
<div class="mt-4 flex justify-end gap-2">
<%= render(UI::Dialog::Close.new(variant: :outline, class: "static")) { "Close" } %>
<%= render(UI::Button.new) { "Okay" } %>
</div>
<% end %>
<% end %>