From 79040e60981dafad2a3e6203ff40944d361bfbf4 Mon Sep 17 00:00:00 2001 From: spinline Date: Thu, 12 Feb 2026 23:51:47 +0300 Subject: [PATCH] fix: make SidenavMenuButton class prop reactive to resolve compilation error --- frontend/src/components/ui/sidenav.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ui/sidenav.rs b/frontend/src/components/ui/sidenav.rs index deb3127..519c9f0 100644 --- a/frontend/src/components/ui/sidenav.rs +++ b/frontend/src/components/ui/sidenav.rs @@ -54,12 +54,12 @@ pub enum SidenavMenuButtonVariant { #[default] Default, Outline } pub fn SidenavMenuButton( children: Children, #[prop(into, optional)] variant: Signal, - #[prop(into, optional)] class: String, + #[prop(into, optional)] class: Signal, ) -> impl IntoView { let class_signal = move || tw_merge!( "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground", if variant.get() == SidenavMenuButtonVariant::Outline { "border border-input bg-background shadow-xs" } else { "" }, - class.clone() + class.get() ); view! { } }