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
21
22
23
<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-sheet-7006b584" data-ui--dialog-target="trigger" data-action="click->ui--dialog#open">Open sheet</button>
<dialog id="ui-sheet-7006b584" 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]" aria-labelledby="ui-sheet-7006b584-title" aria-describedby="ui-sheet-7006b584-description" data-ui--dialog-target="content" data-state="closed">
<div class="fixed z-50 flex flex-col overflow-hidden border bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out inset-y-0 right-0 h-full w-full border-l sm:max-w-md data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right" 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>
<header class="flex flex-col space-y-1.5 text-center sm:text-left">
<h2 id="ui-sheet-7006b584-title" class="text-lg font-semibold leading-none tracking-tight">Edit profile</h2>
<p id="ui-sheet-7006b584-description" class="text-sm text-muted-foreground">Make changes to your profile here. Click save when you're done.</p>
</header>
<div class="overflow-y-auto flex-1 min-h-0 mt-4">
<div class="grid gap-3">
<input value="Rain Root" type="text" class="flex w-full rounded-md border border-input bg-background text-foreground placeholder:text-muted-foreground transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 h-9 px-3 py-2 text-sm">
<input value="rainroot@example.com" type="email" class="flex w-full rounded-md border border-input bg-background text-foreground placeholder:text-muted-foreground transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 h-9 px-3 py-2 text-sm">
</div>
</div>
<footer class="mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end"> <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-label="Close" data-action="click->ui--dialog#close" data-ui-dialog-close="true">
Cancel
</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">Save changes</button>
</footer>
</div>
</dialog></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%= render(UI::Sheet.new) do |sheet| %>
<% sheet.with_trigger(variant: :outline) { "Open sheet" } %>
<% sheet.with_content(side: @side) do |content| %>
<% content.with_title { "Edit profile" } %>
<% content.with_description { "Make changes to your profile here. Click save when you're done." } %>
<% content.with_footer do %>
<%= render(UI::Sheet::Close.new(variant: :outline)) { "Cancel" } %>
<%= render(UI::Button.new) { "Save changes" } %>
<% end %>
<div class="grid gap-3">
<%= render(UI::Input.new(type: :text, value: "Rain Root")) %>
<%= render(UI::Input.new(type: :email, value: "rainroot@example.com")) %>
</div>
<% end %>
<% end %>
Param Description Input

—