Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/src/domain/icons/page_icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn PageIcons() -> impl IntoView {
selected_icon_name.set(icon_name);
selected_icon_function.set(Some(icon_func));

// Click the hidden trigger to let JavaScript handle the drawer opening
// Click the hidden trigger inside the Drawer subtree to open it reactively.
let window = window();
if let Some(document) = window.document()
&& let Ok(Some(trigger)) = document.query_selector("[data-name=\"DrawerTrigger\"]")
Expand Down Expand Up @@ -294,10 +294,8 @@ pub fn PageIcons() -> impl IntoView {
</div>
</div>

// Hidden trigger for JavaScript to wire up
<DrawerTrigger class="hidden">"Open"</DrawerTrigger>

<Drawer show_overlay=false lock_body_scroll=false>
<DrawerTrigger class="hidden">"Open"</DrawerTrigger>
<DrawerContent>
<DrawerHandle />
<DrawerBody class="justify-center items-center">
Expand Down
2 changes: 2 additions & 0 deletions app/src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ pub fn shell(options: LeptosOptions) -> impl IntoView {
<noscript>
<link rel="stylesheet" href="/components/sonner.css" />
</noscript>
<link rel="preload" href="/components/vaul_drawer.css" r#as="style" />
<link rel="stylesheet" href="/components/vaul_drawer.css" media="print" onload="this.media='all'" />

// Load scripts (async for non-blocking parallel download, executes as soon as ready)
<script async src="/components/resizable.bundle.js"></script>
Expand Down
6 changes: 3 additions & 3 deletions app_crates/registry/src/demos/demo_drawer_family.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ pub fn DemoDrawerFamily() -> impl IntoView {
<h2 class="text-lg font-semibold text-foreground">"Options"</h2>
<button
data-name="DrawerClose"
class="flex justify-center items-center rounded-full transition-colors size-8 bg-neutral-100 text-neutral-500 hover:bg-neutral-200"
class="flex justify-center items-center rounded-full transition-colors size-8 bg-neutral-100 text-neutral-700 hover:bg-neutral-200"
>
<X class="size-3" />
</button>
</header>

<div class="space-y-3">
<button class="flex gap-4 items-center px-4 w-full h-12 text-base font-medium rounded-2xl transition-colors bg-neutral-100 text-foreground hover:bg-neutral-200">
<button class="flex gap-4 items-center px-4 w-full h-12 text-base font-medium rounded-2xl transition-colors bg-neutral-100 text-neutral-900 hover:bg-neutral-200">
<Lock class="size-[18px]" />
<span>"View Private Key"</span>
</button>

<button class="flex gap-4 items-center px-4 w-full h-12 text-base font-medium rounded-2xl transition-colors bg-neutral-100 text-foreground hover:bg-neutral-200">
<button class="flex gap-4 items-center px-4 w-full h-12 text-base font-medium rounded-2xl transition-colors bg-neutral-100 text-neutral-900 hover:bg-neutral-200">
<FileText class="size-[18px]" />
<span>"View Recovery Phrase"</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn DemoDrawerNonDismissable() -> impl IntoView {
<Drawer>
<DrawerTrigger>"Open Drawer"</DrawerTrigger>

<DrawerContent style="--initial-transform: 100%; pointer-events: auto;" dismissible="false">
<DrawerContent style="--initial-transform: 100%; pointer-events: auto;" dismissible=false>
<DrawerHandle />

<DrawerBody>
Expand Down
Loading