From 427ce16023613536b8176e6dee7c1580a5980c97 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 23 Oct 2025 02:24:29 +0200 Subject: feat(treewide): Make usage more intuitive --- src/components/container.rs | 47 ++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 18 deletions(-) (limited to 'src/components/container.rs') diff --git a/src/components/container.rs b/src/components/container.rs index 7a4a64f..83b9584 100644 --- a/src/components/container.rs +++ b/src/components/container.rs @@ -11,25 +11,36 @@ pub fn Container( buttons: Vec<(impl IntoView, &'static str)>, children: Children, ) -> impl IntoView { + assert!(!buttons.is_empty()); + + let first_button_path = buttons.first().expect("Should have at least on button").1; + view! { -
-

{header}

- {children()} + - - } - }) - .collect::>()} - -
+ + + } } -- cgit 1.4.1