// rocie - An enterprise grocery management system - Web app // // Copyright (C) 2026 Benedikt Peetz // SPDX-License-Identifier: GPL-3.0-or-later // // This file is part of Rocie. // // You should have received a copy of the License along with this program. // If not, see . use leptos::{ IntoView, component, prelude::{Children, ClassAttribute, ElementChild}, view, }; use leptos_router::components::A; #[component] pub fn Container( header: impl IntoView + 'static, buttons: Vec<(impl IntoView + 'static, &'static str)>, children: Children, ) -> impl IntoView { assert!(!buttons.is_empty()); // TODO: Add the direct link to the first button back. <2026-02-15> // let first_button_path = buttons.first().expect("Should have at least on button").1; view! {

{header}

{children()}
    {buttons .into_iter() .map(|(name, path)| { view! {
  • {name}
  • } }) .collect::>()}
} }