nova_forms/components/
print.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use leptos::*;

/// Only renders the children when printing to PDF.
#[component]
pub fn PrintOnly(
    children: Children,
) -> impl IntoView
where
{    
    view! {
        <div class="print-only" style=format!("")>
            {children()}
        </div>
    }
}

/// Only renders the children when printing to PDF.
#[component]
pub fn ScreenOnly(
    children: Children,
) -> impl IntoView
where
{    
    view! {
        <div class="screen-only" style=format!("")>
            {children()}
        </div>
    }
}