nova_forms/components/print.rs
1use leptos::*;
2
3/// Only renders the children when printing to PDF.
4#[component]
5pub fn PrintOnly(
6 children: Children,
7) -> impl IntoView
8where
9{
10 view! {
11 <div class="print-only" style=format!("")>
12 {children()}
13 </div>
14 }
15}
16
17/// Only renders the children when printing to PDF.
18#[component]
19pub fn ScreenOnly(
20 children: Children,
21) -> impl IntoView
22where
23{
24 view! {
25 <div class="screen-only" style=format!("")>
26 {children()}
27 </div>
28 }
29}