leptos_struct_table/components/
mod.rs

1mod cell;
2mod renderer_fn;
3mod row;
4mod table_content;
5mod tbody;
6mod thead;
7
8pub use cell::*;
9pub use row::*;
10pub use table_content::*;
11pub use tbody::*;
12pub use thead::*;
13
14#[macro_export]
15macro_rules! wrapper_render_fn {
16    (
17        #[$doc_name:meta]
18        $name:ident,
19        $tag:ident,
20        $(#[$additional_doc:meta])*
21    ) => {
22        /// Default
23        #[$doc_name]
24        /// renderer. Please note that this is **NOT** a `#[component]`.
25        ///
26        /// # Arguments
27        ///
28        /// * `content` - The content of the renderer. It's like the children of this view.
29        /// * `class` - The class attribute that is passed to the root element
30        $(#[$additional_doc])*
31        #[allow(non_snake_case)]
32        pub fn $name(content: AnyView, class: Signal<String>) -> impl IntoView {
33            view! {
34                <$tag class=class>
35                    {content}
36                </$tag>
37            }
38        }
39    };
40}